Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 1998 18:57:30 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        adrian@ubergeeks.com
Cc:        eivind@yes.no, rssh@grad.kiev.ua, grog@lemis.com, dyson@iquest.net, wes@softweyr.com, tlambert@primenet.com, hackers@FreeBSD.ORG
Subject:   Re: System V init (was: Linux to be deployed in Mexican schools; Where was FreeBSD?)
Message-ID:  <199812011857.LAA26942@usr07.primenet.com>
In-Reply-To: <Pine.BSF.3.96.981201015637.4238K-100000@lorax.ubergeeks.com> from "ADRIAN Filipi-Martin" at Dec 1, 98 02:15:05 am

next in thread | previous in thread | raw e-mail | index | archive | help
I'm sorry if this looks like I'm picking on you, but...

[ ... Elvind's code ... ]

> 	Well, I took a look.  It seems that most of what we are arguing
> about has little bearing on your implementation.  No start/stop scripts
> nor run-levels. 
> 
> 	While your code no doubt works and does the right think, I see two
> problems with it.  First, it cannot be flipped through and explained in
> less than 10 minutes.  While I can parse that fancy for-loop in the rc, I
> think this would send any newbie screaming for their mother.  The old rc's
> aren't that opaque.  

I think this is specious.  A newbie should not be mucking about in
something as complicated as bringing up all the layered system
services in the correct order.  And clearly, the code would need to
be documented.


> 	Second, the dynamic ordering of dependencies is nice, but having
> the ordering information spread accross every file in rc.d makes it very
> hard to speak with authority on just what is going to happen and in what
> order.  Pulling this ordering information up into a central place would be
> much prefered.  I also content that it would be more maintainable over the
> long haul. 

I believe this could be addressed with a "-n" option, where it tells
you what it would do, but doesn't actually do it.  In other words,
it's an implementation detail, and fairly irrelevent.


> 	I'd argue more for maintaining a list of rc's to run in rc.conf or
> the top level rc itself.  Something like the following:
> 
> scripts=""
> scripts="${scripts} ccdconfig"
> scripts="${scripts} swapon"
> scripts="${scripts} autoboot"
> scripts="${scripts} mount_root"
> scripts="${scripts} mount_local"
> scripts="${scripts} start_net"
> scripts="${scripts} mount_nfs"
> ...
> scripts="${scripts} rc.local"
> 
> for i in ${scripts}; do
>     /etc/rc.d/$i start
> done
> 
> 	The order of execution is easily grasped.  For rc.shutdown, all
> you need to do is reverse the list and loop with "stop" as the argument.

This fails to represent the fact that you shouldn't start something
which consumes "syslog" services before you start "syslogd", or a
fax-to-mail gateway that consumes "SMTP" services before the SMTP
server.

It also fails to communicate that my SMTP services may be provided
by one of a number of vendors: sendmail, qmail, post.office, etc.,
or that fact that I really don't *care* who provides the SMTP
services, so long as *someone* provides them, *and* that they are
provided before my daemon is started, and that my daemon is shutdown
before access to those services are revoked.

Finally, it fails to be extensible in the face of a read-only root
partition, and, in some situations, NFS based mounts following a
netboot (what Sun calls "diskless" and "dataless" configurations,
what Oracle calls a "network computer", and what Corel calls a
"netwinder").


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



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