Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: payerle@alexander.physics.umd.edu (Tom Payerle)
Subject: How to get a script executed at shutdown?
Date: 1997/08/08	[thread overview]
Message-ID: <5sg0fh$hos$1@hecate.umd.edu> (raw)


I am interested in having certain machine-specific commands be executed when
the machine (AS500 5/333) is shutdown.  I have tried adding files of the
sort /sbin/rc0.d/K99mystuff, and it successfully executes on an
init 0, but apparently shutdown -h now and shutdown -r now do not actually
do an init 0.  (Man pages suggest that shutdown now [going to single user mode]
will, haven't verified.  Also states that -h and -r options do /sbin/halt and
/sbin/reboot respectively, and no mention of init 0 in their man pages.)
Therefore stuff in rc0.d are not being executed.

I can do a hack by renaming /sbin/shutdown to /sbin/shutdown.orig and making
my own /sbin/shutdown script which ends by calling shutdown.orig, but this
would either require some serious programming or loss of functionality.  (Eg,
handling shutdown -h now is easy, but shutdown -h +500 is quite a bit harder,
as I don't want my script running 500 minutes before the shutdown occurs.)

Has anyone successfully dealt with this problem?  Email responses (preferred)
will be summarized to the group.


Tom Payerle 	
Dept of Physics				payerle@physics.umd.edu
University of Maryland			(301) 405-6973
College Park, MD 20742			Fax: (301) 314-9525



                 reply	other threads:[~1997-08-08  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox