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

Run Levels (was: Primer needed on modconf and friends.)



At 02:25 PM 3/10/2002 +0100, Matijs van Zuijlen wrote:

>> This seems counter intuitive to me.  Can someone explain why it works that 
>> way?


>To me this makes perfect sense. The K's tell you what you don't want in
>a runlevel, the S's tell you what you do want. In your interpretation,
>if level 2 had service foo started (i.e., it has: S<number>foo), and 3
>didn't (so it has K<number>foo), it would never get stopped going from 2
>to 3. If you follow the manual, foo will always be running in level 2,
>and never in level 3.


Maybe I'm looking at the run levels wrong.  I must be.  Still it seems
backwards.

Say run level 3 is for X, graphical login and such on a machine.  I have a
service I want running only in level 3, perhaps a font server.  So the
current design means to start the service I need to add a S script (link)
in rc3.d.  That makes sense.  

But to stop that service when switching to other run levels means that a
Stop script must be added to *all* the other rcN.d directories.  It would
seem easier to add the Stop one place --- the directory where it was started.

Or another way to look at it, say I'm switching from run level 4 to level 2
-- that is I've never had X running at run level 3.

Why should "K" scripts be run to stop services related to run level 3 (or
any other run levels)?  Why does switching from run level 4 to 2 need to
worry about stopping services not started in run level 4?  If both run
level 4 and level 2 are text-based modes, why bother trying to stop the
font server if it was never running in the first place?

It just seems more logical to stop things you *know* are running then just
trying to stop things that *might* be running.

This is Linux, though, so there must be a reason I'm missing.


Bill Moseley
mailto:moseley@hank.org



Reply to: