Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!slxsys!ibmpcug!miclon!jharuni From: jharuni@micrognosis.co.uk (Jonathan Haruni) Newsgroups: comp.unix.admin Subject: Re: Is there something like 'shutdownrc' at SunOS 4.1 ? Message-ID: <1991May31.164829.13125@micrognosis.co.uk> Date: 31 May 91 16:48:29 GMT References: <868@cadlab.sublink.ORG> <1214@keele.keele.ac.uk> Organization: Micrognosis International, London Lines: 22 csd35@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@micrognosis.co.uk