Is there something like 'shutdownrc' at SunOS 4.1 ?

Jonathan Haruni jharuni at micrognosis.co.uk
Sat Jun 1 02:48:29 AEST 1991


 csd35 at seq1.keele.ac.uk writes:
> [that running a shellscript before shutdown does not offer the same
>  possibilities as running one just before the actual halt]

The main reason shutdown is not a script is that it is suid-root, and
it is not fashionable to have such shellscripts these days.

But if you are contemplating having shutdown (which runs as root) call
a shellscript, then you'd be no better off.  You may as well just write
your own shellscript which does exactly what you want, and use it
instead of shutdown.  Shutdown doesn't do very much anyway, and what it
does do is specified very precisely in its manual entry.

Write your shellscript, stick in a few calls to wall(8), sleep(1),
logger(8), touch(1) (for /etc/nologin), and halt(8), then use
your shellscript to stop the system.

Regards,

Jonathan Haruni
jharuni at micrognosis.co.uk



More information about the Comp.unix.admin mailing list