Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 1997 12:59:12 -0400
From:      "Kevin P. Neal" <kpneal@pobox.com>
To:        Chris Csanady <ccsanady@nyx.pr.mcs.net>
Cc:        hackers@freebsd.org
Subject:   Re: Discussion of boot mechanism (Was Re: /etc/netstart bogons.. ) 
Message-ID:  <1.5.4.32.19970424165912.0198d1f0@mindspring.com>

next in thread | raw e-mail | index | archive | help
At 02:20 AM 4/24/97 -0500, Chris Csanady wrote:
>
>>>1. run levels, and lame shell script links like S01*, S10*, etc.  There is 
>	   
>>>basically no need for this--it is essentially a hack to get around
>>>   the lack of a real dependancy handling system.  How best to implement it
>>>   though?  Even some people have proposed using make.  I dont know if this
>>>   could support the kind of dynamic dependancies we want though.  I was
>>>   thinking more along the lines of having something like
>>>   "#require NETWORK" at the beginning of the scripts, and using a generic
>>>   sh script to parse / order / record dependancy information.
>>
>>I thought about this also. How about having "classes" of scripts, with
>>specific names on individual scripts as well. This would allow you to do
>>things like having, for example, Apache not start up until after the 
>Networking
>>stuff has started. Also, have some Networking programs not start until
>>named has started, etc. Have named not start until ifconfig runs, etc. 
>
>Basically, however hopefully not getting as specific as ifconfig. :)  I
>dont think we should only use predefined "classes" though.  You should be
>able to create dependancies on whatever you want.

Oh, I didn't want to hard-code specific classes into the system. I was
thinking more along the lines of having scripts state that they belong to
a class, like:
#belongto NETWORK

Then whatever classes for a runlevel get defined get defined. 

>>Some scripts are going to fail for somebody sometime. In these cases should
>>you drop back down to the level you are leaving, or continue on up?
>
>You most certainly do not continue. :)  Have you ever had to wait a half hour
>for a machine that tries to mount nfs filesystems when the networking is
>broken?  If services that are required are broken, theres nothing else to do.

But what if the machine that is trying to nfs mount the filesystem is otherwise
perfectly capable of running multi-user mode? I mean, in multi-user mode I
(on my home machies) have X running. X makes debugging easier just because
I have so much more room to work with on screen. 

It's fault tolerance. 

>>As for run levels, why not define three: halted, single user, and multiuser.
>>Have the multiuser level be configurable (if you want it at, say, 3 then you
>>can have it be 3). Have the other levels be user configurable.
>
>Well, this is essentially how things are.  We currently have single, and
>multi.  Any further run-level abstraction per say should be handled by rc.
>We do need something that will be executed upon a halt though..

Well, like if you wanted multiple single-user "runlevels" or multiple
multi-user "runlevels". It seems like run levels isn't quite the term for
this. How about multiple "configurations". Hmmmm, no, that's not quite it
either. Hmmmm. "Run states"? Hmmmmm. 

>[ cosmetic stuff deleted ]
>
>>As well has keeping rc-style startup for the people that just *like* it.
>>
>>I'd like to see the startup scripts get run not by init, but by a program
>>run by init. This would allow for very easy additions of other rc.d 
>directories.
>
>This is essentially how it is.  init calls rc.  rc can do whatever it wants
>from there.  I don't think this needs to change, however a shutdown hook must
>be added.  Leaving this alone allows us backword compatibility by just 
>replacing
>the script with the old style one.

Well, as in, not have the rc.d handling be in init, and also not have it
scattered in #!sh scripts everywhere. One single, powerful, easy to use
mechanism. Run it from rc, or whatever. Perhaps we are saying the same
thing. 
--
XCOMM Kevin P. Neal, Junior, Comp. Sci.     -   House of Retrocomputing
XCOMM  mailto:kpneal@pobox.com              -   http://www.pobox.com/~kpn/
XCOMM  kpneal@eos.ncsu.edu              Spoken by Keir Finlow-Bates:
XCOMM "Good grief, I've just noticed I've typed in a rant. Sorry chaps!"




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