Why do I have two links in my rc.3 directory?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Why do I have two links in my rc.3 directory?
# 1  
Old 11-25-2009
Why do I have two links in my rc.3 directory?

Hi,

I am doing a services audit on one of our servers at work and I notice that I sometimes have a service with two slightly different prefixes. For example,

S94httpd
K15httpd

Can one of them be safely deleted?
# 2  
Old 11-25-2009
They can (in theory) both safely be deleted, but that will mean that you can't start/stop your HTTP server anymore.

There are (usually) two links to any service script in rc.3 (what's the full path? /etc/rc.d/rc.3? /etc/init.d/rc.3? Just curious), one for starting, one for stopping. Those beginning with 'S' are run when the system enters that runlevel, in numerical and alphabetical order, so S94httpd is started after (exemplary) S93mysql but before S94imapd.

Similarly, scripts starting with K are stopped ("killed") as the system leaves that runlevel.
# 3  
Old 11-26-2009
Further to pludi. Don't delete them.

The "S" scripts are executed in numerical order with the parameter "start" when you enter the runstate and the "K" scripts are executed in numerical order with parameter "stop" when you leave the runstate. The idea is to stop processes in the reverse order you started them.
In most cases the matching start and stop will link to the same script.
See "man rc".

If you ever need to disable a properly written "rc" script first check whether there is a parameter file value to do this. Failing that, renaming the link so it does not start with "S" or "K" is allowed. If you make changes, be prepared to repeat them after applying O/S patches.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Broken Links in the Site Link Directory

(split from another thread) Hi. Can you please post a copy of the exact link you used? I have no trouble accessing either the readme, or the link to "Featured Books and Articles by Active Forum Members - Links" Thanks. (2 Replies)
Discussion started by: Scott
2 Replies

2. UNIX for Dummies Questions & Answers

Command to find all soft links in a directory

I need the command to find all soft links in a directory. Can someone please help. Thank you. (2 Replies)
Discussion started by: jgeo01
2 Replies

3. UNIX for Advanced & Expert Users

home directory links

I need to put a soft link in each users home directory that is somethink like this workspace --> /vol/workspace Any suggestions what is the easiest way to accomplish this? (3 Replies)
Discussion started by: frankkahle
3 Replies
Login or Register to Ask a Question