Subject: Re: run levels (was Re: The new rc.d stuff...)
To: Perry E. Metzger <firstname.lastname@example.org>
From: Andrew Brown <email@example.com>
Date: 04/24/2000 09:46:18
>> (1) add a kernel variable (and a sysctl) call kern.runlevel which is
>> a string that can only be updated by init.
>> oh, and this is *completely* ignorable by anyone who doesn't wish to
>> use it.
>It isn't ignorable by people with taste.
why can't you pretend it's not there and just ignore it?
>Run levels are useless. A machine in production typically runs at one
>run level all the time -- it doesn't shuttle from one run level to
>another on an hourly basis. "single user mode" just means "boot and
>then hand out a shell instead of executing rc scripts" -- it isn't
>really a "level", and it is used only for maintenance. A machine is
>off, or it is being maintained, or it is running for real. Period.
yes, very true.
>I've never seen run levels used for any good purpose in any System V
>installation, and I've worked on some pretty huge installations. Never
>having seen a function for a facility leads me to belive that facility
>is not useful. Run levels have always been a solution looking for a
>problem, and they add complexity without giving any benefit in
>return. They were a bad idea, and I see no reason to further a bad
i'm not furthering it.
>rc.d does not fall into this category. The reason I like rc.d is that
>it improves maintainability in large sites by making it trivial for
>packages (and even built in programs) to install rc hooks simply by
>adding a file. I've run sites with literally thousands of computers,
>and without an rc.d-like solution it just isn't pleasant. Every time
>I've dealt with a system without something like rc.d, I've been forced
>to re-create it on my own. This leads me to believe that the facility
rc.d seems fine to me, except that i now can't decide where to shove
stuff like a local static route or a silly local daemon. so i'm still
using rc.local, but now it "feels wrong".
>Given rcorder, we've substantially improved on the original
>idea. Instead of the cryptic S105screwme files, we just have a script
>per daemon, with a simple and clean solution to the "what the heck do
>I do first?" problem.
>So, rc.d makes some sense. However, run levels and all they implied
>were a bad idea. They have no function.
all i was saying (or trying to demonstrate) is that "system v run
levels" are just around the corner, if anyone wanted to take that
turn. if not, let's keep going and get off at saratoga road. the
round table is behind the shell station. that's fine with me, and i
system v run levels are, i agree with, mostly very badly implemented,
and leave me with no idea of what the original author was trying to
invent. certainly linux's version is the worst of all.
but what i was suggesting was that the kernel waste space keeping
track of something called a run level (which means nothing), and that
shutdown, instead of actually shutting the system down, would tell
init to switch to a different one (and have init make a note of it in
the kernel). which would then cause init to execute a command which
would accomplish the desired action. shutdown could just as easily
just shut the machine down, as could kill.
it would provide a place for different rc.shutdown scripts as well.
they wouldn't have to be numbered in so assinine a manner as 1 2 3 4 5
6, but you could call them names. that, imho, is a *major*
all i'm trying to get across is that netbsd doesn't just have two "run
levels", it has five, if you look at them the way that system v looks
at them. and it'd be really easy to change shutdown so that you could
say "shutdown and reboot" or "shutdown and halt" or even "shutdown and
>I see no reason to dogmatically reject System V originated ideas if
>they are good, but when they suck, they should be ignored. Run levels
>suck. They should be ignored.
okay fine. be that way. i was just thinking out loud anyway. :)
|-----< "CODE WARRIOR" >-----|
firstname.lastname@example.org * "ah! i see you have the internet
email@example.com (Andrew Brown) that goes *ping*!"
firstname.lastname@example.org * "information is power -- share the wealth."