TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:20740] Magic runlevels
Jon Schewe said:
> Actually it is in rc0.d, look at the halt script.
*sigh* There it is... I just scanned the directory quickly and missed it.
(If I'd been thinking, I would've just looked at the last S entry - not much
point in trying to do anything else after shutting down, after all...)
> It calls halt -p -d -f, at
> least it does on my system, SuSE 6.4.
Basically the same here, except Debian adds a -i also. ("Shut down all
network interfaces just before halt or reboot.")
> > > But note that shutdown/reboot/halt are hardcoded to runlevels 0,1,6,
> > > you ought to be able to recompile the source to change that...
> >
> > I suspected as much.
>
> Actually they're not in the binary. It's all in inittab and what scripts it
> calls. If you want to halt at runlevel 3 make /etc/rc3.d have a symlink to
> the halt script, just like it is in rc0.d.
man shutdown states that it calls init to change the runlevel. man halt says
that it calls shutdown unless -f is specified. This would appear to indicate
that if 0 were made a non-shutdown runlevel, calling `shutdown -h now` or
`halt` would leave the system up, which is how I interpreted the original
statement that "shutdown/reboot/halt are hardcoded to runlevels 0,1,6".
Thanks for the info!
--
"Two words: Windows survives." - Craig Mundie, Microsoft senior strategist
"So does syphillis. Good thing we have penicillin." - Matthew Alton
Geek Code 3.1: GCS d- s+: a- C++ UL++$ P+>+++ L+++>++++ E- W--(++) N+ o+
!K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI++++ D G e* h+ r++ y+