Subject: Re: shutdown actions
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Open Carefully -- Contents Under Pressure <greywolf@starwolf.starwolf.com>
List: current-users
Date: 12/30/1997 22:21:08
[ redirected to current-users ]

der Mouse sez:
/*
 * > Maybe let shutdown check for /etc/rc.shutdown and, if exists, run it
 * > before telling init to shutdown the rest?
 * 
 * I'm not sure about this.  There are at least five documented ways of
 * shutting the system down (signal init with SIGTERM or SIGTSTP, or run
 * shutdown, halt, or reboot), with at least four different target states
 * (single-user, halt, reboot, and that weird one you get when you SIGTSTP
 * init).  Which of them should run what, and when?

LONG ANSWER:
This is easy.  As soon as init would begin the transition between states,
it would run rc.shutdown just prior to sending signals.  As soon as it
finishes (or times out (should it time out per step thru the script?  That
might get tricky/kludgey quickly...)), init would then proceed to send
signals to the remaining processes.

SHORT ANSWER:  "That's init's job."

WRT the TSTP deal, see above.  Init transitions into single-user mode
as soon as all the logins are freed on exit.

I was going to comment on its being designed more toward hard-terminal
logins than to network sessions, but it appears to have been re-designed
to deal explicitly with login sessions.

 * 
 * 					der Mouse
 * 
 * 			       mouse@rodents.montreal.qc.ca
 * 		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
 */


				--*greywolf;
--
# On the 'Net:  Why are more and more fourth-level wizard(-wannabe)s trying
# to invoke ninth-level magic instead of taking the time to climb the other
# (quite essential) thirteen or fourteen levels so they can do this properly?
# Don't they know their console will crumble into dust if they do that?
# greywolf@starwolf.com