From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,c495d349a299fd95 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-06-23 13:22:37 PST Newsgroups: comp.unix.osf.osf1 Path: bga.com!news.sprintlink.net!hookup!swrinde!news.uh.edu!uuneo.neosoft.com!nmtigw!peter From: peter@nmti.com (Peter da Silva) Subject: Re: Does 'shutdown' really shutdown? Message-ID: Sender: peter@nmti.com (peter da silva) Organization: Network/development platform support, NMTI References: <2ubec7Ebqk@uni-erlangen.de> Date: Thu, 23 Jun 1994 15:54:50 GMT In article <2ubec7Ebqk@uni-erlangen.de>, Horst Luehrsen wrote: > If we use shutdown -r to shutdown and reboot the machine, the machine shuts > down really fast and I think, it doesn't execute the /sbin/rc2.d/K00ingres, > but instead kills all processes. > Am I right with this guess? Or did I put K00ingres in the wrong directory? You're right. You're being hosed by the BSD shutdown model. In BSD based systems it sends a signal 15 to all procs, waits "a reasonable time", then sends a signal 9. In System V based systems it sends a signal to init to change the run level, and then init's responsible for running shutdown scripts. DEC merges the two inits. For regular shutdown, it (or init, I'm not too clear) runs the shutdown scripts. For shutdown -r it runs the command "reboot". What it should do is set the run level to 6 and let init run reboot when it finishes changing the run level. The stock OSF inittab doesn't even *have* a run level six defined. :-< System V defines init levels 0 and 6 like this: r0:056:wait:/etc/rc0 1> /dev/console 2>&1 /dev/console 2>&1 /dev/console 2>&1 /dev/console 2>&1 I'd suggest that DEC add a "reboot" option to /sbin/rc0: that does: # # Reboot if it's booting time... # if [ "$ARGONE" = reboot ]; then /sbin/reboot else ... existing code ... fi then add: s6:6:wait:/sbin/rc0 reboot < /dev/console > /dev/console 2>&1 So you'd use "init 6" to reboot cleanly, like in Ssystem V. -- Peter da Silva `-_-' Network Management Technology Incorporated 'U` 1601 Industrial Blvd. Sugar Land, TX 77478 USA +1 713 274 5180 "Hast Du heute schon Deinen Wolf umarmt?"