[comp.unix.admin] There can be something like 'shutdownrc' at SunOS 4.1 ?

brendan@cs.widener.edu (Brendan Kehoe) (05/29/91)

   From: csd35@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@cs.widener.edu
  Widener University in Chester, PA                A Bloody Sun-Dec War Zone

brendan@cs.widener.edu (Brendan Kehoe) (05/29/91)

Re <868@cadlab.subhink.ORG> <1214@keele.keele.ac.uk>
R comfeh2Organization: Widener CS Dept
Lines: 29
In-Reply-To: csd35@seq1.keele.ac.uk's message of 29 May 91 08:11:59 GMT


     D   we run an Oracle servd   It would be really useful to have shutdown execute a s   servvrs can bD 
FTP to uunet.uu.net and get bsd-sources/sbin/shutdown.c, and have it
do a system() call to your script die_you_gravy_sucking_pig_doc [haha GREAT funcrion], in the
if(doreboot) section and after if(dohalt). [That way, rwant it to halt inmediately it'll forget that.] Be really careful
about the perms for your s
Compile, move /usr/etc/shutdownSto /usr/etc/shutdown.sun, and plop
your nice newiprogram in its place (own29 (n root.operator, 4554).
Now your users will get their warning and then everything will go down
smoothly (like good brandy).

This is just a434ught -- hasn't been tried and isn't guaranteed.

Brendan
-- 
     Brendan Kehoe - Widener Sun Network Manager - brendan@cs.widDner.edu
  Widener University in Chester, PA                A Bloody Sun-Dec War Zone
#! rnews 840