Kenn Humborg wrote:
>>>>OK I've an initscript that I wan't called at startup and shutdown.
>>>>I added it using chkconfig and manually with the same results.
>>>>The problem is the S script is called but the K one is not?
>>>> ...
>>>$ find /etc/rc.d/ -name "K*battery" | xargs ls -l
>>/etc/rc.d/rc0.d/K03battery -> ../init.d/battery
>>/etc/rc.d/rc1.d/K03battery -> ../init.d/battery
>>/etc/rc.d/rc6.d/K03battery -> ../init.d/battery
>>[padraig at dhcp-208 pixelbeat]$ find /etc/rc.d/ -name "S*battery" |
>>xargs ls -l
>>/etc/rc.d/rc2.d/S97battery -> ../init.d/battery
>>/etc/rc.d/rc3.d/S97battery -> ../init.d/battery
>>/etc/rc.d/rc4.d/S97battery -> ../init.d/battery
>>/etc/rc.d/rc5.d/S97battery -> ../init.d/battery
>>> Right, that's the first obvious cause eliminated.
>> Now, are you positive that it's not actually being called?
> What if you put something like
>> ( echo $* ; date ) >> /tmp/battery.log
This essentially what the script does :-)
> at the top of the script?
>> Does it work if you manually stop it:
>> # service battery stop
Hmm didn't know about the service command.
Yes this does call it?
Padraig
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!