[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: runlevels



But, are not the Kill scripts for a particular service run when the
operating system leaves that run level on its way down to a lower run level,
vice when one enters the next lower run level?  Example: if one starts a
service in run level 3 and wishes to kill that service when entering run
level 2, then one must put the kill script in the same rc?.d
directory...otherwise, if you put the kill script at run level 2, then the
operating system will not execute said kill script until it is in the
process of exiting run level 2 on its way down to run level 1 or run level
0.

More simply put:  if I have a S??something script in /etc/rc3.d and I want
to terminate that service if I leave run level 3, going down, then I must
put my K??something script in /etc/rc3.d also.  If I put the K??something
script in /etc/rc2.d, it will not execute until I exit run level 2, going
down.

-----Original Message-----
From: redhat-list-bounces redhat com
[mailto:redhat-list-bounces redhat com]On Behalf Of Benjamin J. Weiss
Sent: Wednesday, January 05, 2005 1:23 PM
To: General Red Hat Linux discussion list
Subject: Re: runlevels


Steve Buehler wrote:

>         If you have S98script in the rc3.d directory, you should put 
> K98script in the same directory.  That way, when you start runlevel 3, 
> it will run and when you change or stop runlevel 3, it should kill 
> it.  I do not know if having the kill script with a different number 
> than the start script would matter or not, but it makes things look 
> better when trying to associate them.  I wouldn't think it would 
> matter since from my understanding of it, the number is just telling 
> the system the order of starting or deleting compared to the other 
> starts and kills.


Um...no.  You should only have one script in each directory, because the 
scripts are only run when the runlevel is entered, not when it leaves. 

Take a look at a default installation, and you'll only find one K or S 
script for each service.  Not both.

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request redhat com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]