[Voyage-linux] stopping a script on reboot
Darshaka Pathirana
(spam-protected)
Sat Mar 20 03:43:46 HKT 2010
On 03/19/2010 08:33 PM, Ant A wrote:
>
> Hello I am trying to stop a script when I tell the ALIX to reboot. I have a
> script that runs at boot already and I want it to stop when I do a reboot
> command. It needs to stop because this script constantly writes and deletes
> a file and if I do a reboot while this is running then I get an STALE error
> and I need to run fsck
>
> TO run the script at boot I put it in /etc/init.d and then on /etc/rc.local
> i write ./script_name, this runs it at the end of most processes at boot.
> ALso to tell the system to run the script I run the following command:
>
> update-rc.d blah defaults
>
> So I am thinking is something similar Any ideas? Thanks
Hmm. You should trap the EXIT and TERM in your script and do some
cleanups. For some details see:
[1] http://tr.im/SyBs
To have an effect with "update-rc.d" you need to put your script in
/etc/init.d. "man update-rc.d" should give you details.
Greetings && HTH,
- Darsha
More information about the Voyage-linux
mailing list