[lug] init script that won't run stop() under F11

Zan Lynx zlynx at acm.org
Tue Sep 29 18:32:35 MDT 2009


Michael J. Hammel wrote:
> On Tue, 2009-09-29 at 18:00 -0600, Zan Lynx wrote:
>> RedHat init looks into /var/lock/subsys/* to see if it needs to run 
>> start/kill scripts during initlevel changes.
>>
>> The start should create a file in there with the right name and stop 
>> should remove it. Look at the rest of the scripts to see, but I think it 
>> is just the name of the init script.
> 
> Yep - that was it.  Just touch the script name under /var/lock/subsys
> and then remove it on stop. Thanks!
> 
> Is that just a RH thing or do other distros rely on that too?  Do other
> distros even have a /var/lock/subsys?  I want to make this script
> functional on the more popular distros.
> 

I don't know.

I've done several scripts for RedHatish systems but not for others. I 
know Gentoo does not use /var/lock/subsys. I doubt that helps you :)

You could read through /etc/rc.d/rc to see what it does. If that isn't 
the name of the script, check /etc/inittab to see. If the system uses 
Upstart then everything starts from /etc/event.d so look at the rc1, 
rc2, etc files in there.

I also think the old SysV init scripts are probably becoming obsolete 
due to Upstart and the like.

-- 
Zan Lynx
zlynx at acm.org

"Knowledge is Power.  Power Corrupts.  Study Hard.  Be Evil."



More information about the LUG mailing list