SUMMARY: Modifying shutdown

From: Chuck Yerkes (cyerkes@jpmorgan.com)
Date: Sat Apr 03 1993 - 03:59:56 CST


The question resides at the bottom. 12 Hours ago I asked it and have reponses.
Thank you.

  Most of the responses I've gotten have had to do with renaming shutdown
(or halt or reboot) and replacing that with a script. I had thought of
that but I needed the functionality of shutdown (rwall's, locking out
users, etc) with a script just before halt. I had also grabbed the
BSD source without much luck. I really didn't want to rewrite it.

There were only two answers that met the criteria.

Second Prize goes to:
  Wayne Schmidt came up with running shutdown -k (under whatever name) and
when done, run my script and halt (or reboot). This is essentially a
very good idea. Have my script run the shutdown -k, watch a `ps` and
wait for it to be gone, then do my stuff. I'd almost do this, except for
the number one choice.
  He wins a hearty pat on the back, to be administered by himself or anyone
of his choosing.

The winner is (or will be once I really check it out) from Daniel Trinkle is this:
 
> If you want, you can grab /pub/trinkle/shutdown.tar.Z from
> ftp.cs.purdue.edu. It is a shutdown that allows you to control the
> actions of shutdown with configuration scripts. It also allows
> non-root users to shut down the system if they are in a control list
> and they know their login password (verification of identity).
>
> With this version you could probably easily do what you want.
>
> Daniel Trinkle trinkle@cs.purdue.edu

He wins, should he choose to accept it,
  a can of Cheese Wiz (to be purchased at his own risk and expense)
-----------------------------------------------
Thanks for the responses and efforts from the following people:
  trinkle@cs.purdue.edu (Daniel Trinkle)
  wayne@internet.sbi.com (Wayne Schmidt)
  louis@andataco.com (Louis Brune)
  scheller@c3ot.saic.com (Mark J. Scheller)
  emccaff@pica.army.mil (Ennis W. McCaffrey
  davidl@Newbridge.COM (David Law)
  receda@chj401.SINet.SLB.COM (Wilson Receda - Systems Support, Beijing, PRC)
  matt@wbst845e.xerox.com (Matt Goheen)
------------------------------------------
The question:
> The machine: SPARC ][ with 4.1.2.
>
> Problem:
> We have a number of machines that are running various odd processes.
> When they crash, we go through some manual recovery (check optical disk
> states, DBMS stuff, etc).
> When we reboot a machine (controlled), we'd like to do some things
> before the halt happens (make sure that Sybase is down, and unmount optical
> disks, etc).
>
> Shutdown sends a SIGTERM (-15) to all the processes, but there is often
> not enough time to do some of the things we'd like. We use "shutdown" to
> send messages out to the users and give use some time.
>
> What we'd like:
> We'd like to have shutdown run and wait for a script before shutting
> down. I could rewrite shutdown, but it already does quite a bit that we
> want (annoying users with notices, locking out logins, etc). Right now
> I use "shutdown -k" (fake a shutdown), followed by running a script to
> do that voodoo that I need to do, followed by a "reboot". I'd like to
> be able to do these at 5AM and don't want to have to be here.
>
> Any thoughts?



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:40 CDT