LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Symbolic links for /etc/rc.d/ stuff (https://www.linuxquestions.org/questions/linux-newbie-8/symbolic-links-for-etc-rc-d-stuff-828643/)

password636 08-26-2010 11:22 AM

Symbolic links for /etc/rc.d/ stuff
 
Hi,

In RHEL, under the directory /etc/rc.d/, there're init.d/, rc<X>.d/, rc, rc.sysinit and rc.local. Why there are symbolic links: /etc/init.d, /etc/rc<X>.d, /etc/rc.sysinit, /etc/rc and /etc/rc.local for them? Why need these symbolic links?

Thanks in advance!

suprstar 08-26-2010 11:28 AM

Because all the actual scripts are in /etc/init.d - depending on your runlevel (1=single user, 3=CLI/network, 5=gui), all the scripts run from /etc/rc1.d /etc/rc3.d /etc/rc5.d etc.. So you make symlinks vack to the real scripts so if you want to change one, you dont have to change it a lot of places. Change it once, and it runs correcly for any runlevel. Then you can just add and remove symlinks for whatever services you do/dont want running, or re-arrange them just for one runlevel.

Hangdog42 08-26-2010 11:28 AM

There are two standards for initialization scripts, BSD-style and SysV-style. Those symlinks allow any program that understands either one to function. I think most Linux distros use BSD style init, but Slackware and a couple of others use SysV.

password636 08-26-2010 11:51 AM

Quote:

Originally Posted by Hangdog42 (Post 4078641)
There are two standards for initialization scripts, BSD-style and SysV-style.

Yep, this seems to be the answer I was looking for.


All times are GMT -5. The time now is 09:12 PM.