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

Re: /etc/init.d structure [long rant]



>>jghasler@win.bright.net wrote:
 >Manoj Srivastava writes:
 >> *Nothing* has an S* in more than one level. A package is meant to be at a
 >> certain run level and higher. A level 3 package is started at run level
 >> 3, killed in run level 2, and at *no* other level. See how this works?
 >
 >Simple and elegant, but not very flexible.  How about a state machine
 >approach?

Assuming "runlevel" is roughly equivalent to "state", the above model is
a stack of states.  A state transition diagram would be a (potentially fully
connected) graph of states.  (Potentially) what a mess. :)

Next question is how to define a "state" -- 6 basic states is what we have
now.  If we want more states (finer grain) our graph becomes messier.

Also, runlevels _are flexible.  Nobody can force me to start networking
daemons at RL 2 -- I can bloody well start them from ip-up when I ring my
ISP, at whatever runlevel I happen to be then.  (In practice I don't care: 
when I don't need networking daemons, they waste about $0.5 worth of my 
swap partition.  Big deal).

If you let user similarly customize the states, you _will end up with a 
fully connected graph for STD -- definitely a mess.  
(One program implementing a complex state machine is sendmail, BTW.)

Stack is a much simpler structure -- easier to implement, less bugs etc.
Besides, it's almost there already.

--
Dimitri
emaziuk at curtin dot edu dot au, if you're replying to
-------------------------------  a Usenet posting
Avoid reality at all costs.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: