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

Re: Shutdown hooks



On 10/12/08 11:56, Kumar Appaiah wrote:
On Sun, Oct 12, 2008 at 09:56:00PM +0530, Bhasker C V wrote:
I can write a wrapper to /sbin/shutdown for doing this, but i am just trying to find out if there is any method already available for doing this ?

/etc/rc0.d and /etc/rc6.d should be where you should place hooks for
running programs as you shut down or restart the machine
respectively. The convention is to put the scripts in /etc/init.d and
then create symlinks in /etc/rc<n>.d, best handled with update-rc.d.

But it's too late then.  The shutdown can't be stopped, I think.

I'd wrap /sbin/shutdown.

--
Ron Johnson, Jr.
Jefferson LA  USA

Help a man when he is in trouble and he will remember you when
he is in trouble again.


Reply to: