Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 1995 20:49:07 -0400
From:      Robert Withrow <witr@rwwa.com>
To:        Hackers@FreeBSD.ORG
Subject:   Re: ports startup scripts 
Message-ID:  <199509230049.UAA11517@spooky.rwwa.com>
In-Reply-To: Your message of "Thu, 21 Sep 1995 20:39:56 CDT." <199509220139.UAA08421@bonkers.taronga.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Regarding sysv-style ``run levels'', someone said:

> If you make them
> monotonic and stick to that instead of having complex /etc/rcN scripts
> there's no problem.
> Just because System V got them wrong doesn't mean we have to.

The problem everyone here seems to have is that they are considering
them to be ``levels'' as in ``level 3 is higher than level 2''.

The sysv entities are *not* levels, but are, instead, *states* (and
some of the documentation calls them that.  There is no necessary
connection between run*state* 1 and run*state* 2.  Run*state* 2 should
*not* be considered ``higher'' or more ``multiuser'' or whatever than
run*state* 1.

The problem with trying to make run*states* into run*levels* is that
there is not any real ``monotonic''ness in what has to be running for various
conditions. 

The nice thing about sysv runstates is that you can express exactly what
you want the state of the system to be in any particular runstate.  Some
set of software should be running and some other set should not.

The not-so nice thing about the way sysv implement it is that the
runstates need to have global knowledge about all the other states
so that they can know what to kill to change the state correctly.  But
this is *not* a requirement for having runstates, and my experience
indicates that the ``state'' concept has much more utility than
the ``level'' one, and so I think it is worth some effort to try to
correctly implement it.

For example, I would like to define my own, private ``protocol debugging''
system runstate (call it, say, 4) and be able to switch from normal
``multiuser'' to ``protocol debugging'' states on command.  This would
be quite easy with the ``state'' method, but would require ton's of haking
with the monotonic ``level'' method.

-----------------------------------------------------------------------------
Robert Withrow, Tel: +1 617 598 4480, Fax: +1 617 598 4430 Net: witr@rwwa.COM
     R.W. Withrow Associates, 319 Lynnway Suite 201, Lynn MA 01901 USA




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509230049.UAA11517>