gabriel rosenkoetter on Mon, 7 Jul 2003 12:50:16 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] pre-reboot scripted message?


On Sun, Jul 06, 2003 at 07:10:25PM -0400, kaze wrote:
> That stuff I got, its the mechanics of
> 
> # ln -s /etc/init.d/openlid.sh /etc/rc6.d/S01openlid.sh
> 
> that impress me, I know it has something to do with kernel ring(?) run
> levels,

I've never heard "ring" used in there...

rc stands (I think?) for run control, btw.

The principle, under SysV-style init scripts[1] is that you use
init(8) to switch run levels, and that anything in /etc/rcN.d is
executed at run level N. Scripts that are listed as SXXname are
passed a "start" argument, scripts list as KXXname a "stop"
argument. The XX governs order within starting and stopping. The
ordering of two scripts at a given number-level is, to my knowledge,
undefined (that is, don't rely on alphabetization if you want to be
portable).

Under real SysV Unix, run level 0 is a full system halt (to the boot
PROM prompt, typically), 1 is single user, 2 is mult-user, 3 is
graphical multi-user, 4 and 5 aren't really used by the OS but may
be by some application-specific or localized setup, and 6 means
reboot.

Linux modifies this a bit, using all of 2-4 as pretty much the same
thing and 5 as graphical login. Don't ask me why. From what I've
read of various Linux vendor mailing lists, *they're* not even sure
why they don't just do it the SysV way.

[1] "init scripts" just means scripts run by init(8).

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgp2piW2CxzOS.pgp
Description: PGP signature