Where is system's startup script directory
Hi,
Can help me where is Linux RH system's startup script directory? thanks. |
I forgot but I would suggest searching for /etc/rc.sysinit
Others will come up with this. Qu Chen |
It depends on the version I believe. But if you poke around in /etc/ and look for rc anything, those are usually your startup scripts ;)
/etc/rc.d/ is a possibility. Cool |
Hi, Thanks for your help.
can i just create a file called "Test". This file contain some script such as: #samba startup deamon case "$1" in if [ -f /usr/local/samba/bin/smbd -a -f /usr/local/samba/lib/smb.conf]; then /usr/local/samba/bin/smbd -D /usr/local/samba/bin/nmbd -D ;; echo "Usage: $0 start" exit 1 ;; will it works if i save it in /etc/rc.d ? or i have to insert the above script in rc.sysinit? thanks. Any help man to understand startup directory? |
Not that I am aware of (the man page to help understand startup dir) however you might find some discussion on sysVinit around the board and on google.com/linux
As for "create file Test with code" and just place it in that directory, not likely. You probably have runlevel directories though (rc.3 or rc3.d) that correspond to your current runlevel (to find out check /etc/inittab and look for id:3:default or something similar, might be 5) and you could do what you are wanting there. Make sure it's executable though. What I'd suggest is finding an rc.local file and using that instead. Almost every distro I've used has one, run a search: find / rc.local OR locate rc.local Inside there you can do what you are wanting, this file is exactly for what you are looking to do. Cool |
All times are GMT -5. The time now is 02:44 AM. |