LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-26-2010, 11:22 AM   #1
password636
Member
 
Registered: Jun 2006
Location: Beijing
Posts: 60

Rep: Reputation: 1
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!
 
Old 08-26-2010, 11:28 AM   #2
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 23
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.
 
Old 08-26-2010, 11:28 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
1 members found this post helpful.
Old 08-26-2010, 11:51 AM   #4
password636
Member
 
Registered: Jun 2006
Location: Beijing
Posts: 60

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Hangdog42 View Post
There are two standards for initialization scripts, BSD-style and SysV-style.
Yep, this seems to be the answer I was looking for.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic links jjanes Linux - Newbie 1 06-19-2009 02:01 PM
Symbolic links Vs Hard links sulekha Linux - General 2 10-02-2008 07:03 AM
Symbolic links pdstatha Programming 1 04-08-2002 09:50 PM
Symbolic links Valerie Linux - Newbie 12 03-31-2002 01:49 AM
symbolic links NoahsMyBro Linux - Newbie 1 11-16-2001 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration