* How to get a script executed at shutdown?
@ 1997-08-08 4:00 Tom Payerle
0 siblings, 0 replies; only message in thread
From: Tom Payerle @ 1997-08-08 4:00 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-08-08 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-08-08 4:00 How to get a script executed at shutdown? Tom Payerle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox