There can be something like 'shutdownrc' at SunOS 4.1 ?
Brendan Kehoe
brendan at cs.widener.edu
Thu May 30 00:46:50 AEST 1991
From: csd35 at seq1.keele.ac.uk (Jonathan Knight)
Date: 29 May 91 08:11:59 GMT
Nope, that's not really as useful as shutdown running a script. Suppose
we run an Oracle server, then what we want is the Oracle server to shut
down at shutdown time, not before anyone has had the shutdown message.
It would be really useful to have shutdown execute a script so that
servers can be neatly closed down at the right moment.
FTP to uunet.uu.net and get bsd-sources/sbin/shutdown.c, and have it
do a system() call to your script inside the function
die_you_gravy_sucking_pig_doc [haha GREAT function], in the
if(doreboot) section and after if(dohalt). [That way, if you're
rebooting or doing a normal shutdown it'll do your script, but if you
want it to halt immediately it'll forget that.] Be really careful
about the perms for your script.
Compile, move /usr/etc/shutdown to /usr/etc/shutdown.sun, and plop
your nice new program in its place (owned by root.operator, 4554).
Now your users will get their warning and then everything will go down
smoothly (like good brandy).
This is just a thought -- hasn't been tried and isn't guaranteed.
Brendan
--
Brendan Kehoe - Widener Sun Network Manager - brendan at cs.widener.edu
Widener University in Chester, PA A Bloody Sun-Dec War Zone
More information about the Comp.unix.admin
mailing list