From: Bryan Curnutt (bryan@uhura1.uucp)
Date: 05/28/92


From: bryan@uhura1.uucp (Bryan Curnutt)
Subject: Re: shutdown procedure?
Date: 28 May 1992 05:51:25 GMT

In article <l268ufINNdat@almaak.usc.edu> ajayshah@almaak.usc.edu (Ajay Shah) writes:
>(Why is Sun's /usr/etc/shutdown program 25k long (and world unreadable??)?)

I don't know how much of the bloat this accounts for, but Sun's
/usr/etc/shutdown does a fair amount of work that isn't in a
simple "sync;sync;halt" procedure.

It parses its arguments and does conversions to find out when the
specified shutdown time occurs (you can specify times such as "now",
"+5", "23:45"). It also sends out messages at regular intervals to
everyone logged in, telling them that the system is going down. It
looks in /etc/xtab to see what hosts are mounting disks via NFS from
the machine being shut down, and sends messages to those machines so
those machines can notify users that the machine is being shut down.
Five minutes before shutdown (sooner if shutdown was invoked for a
time < 5 minutes into the future), it creates the file /etc/nologin
to disallow logins. And, of course, it uses syslogd to record messages
logging the shutdown.

Most of this is overkill if you're the only user on the machine.

-- 
Bryan Curnutt                   bryan%uhura1@uunet.uu.net