From owner-freebsd-hackers Tue Dec 1 10:57:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA02520 for freebsd-hackers-outgoing; Tue, 1 Dec 1998 10:57:56 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA02514 for ; Tue, 1 Dec 1998 10:57:54 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id LAA18286; Tue, 1 Dec 1998 11:57:37 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp03.primenet.com, id smtpd018258; Tue Dec 1 11:57:32 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id LAA26942; Tue, 1 Dec 1998 11:57:30 -0700 (MST) From: Terry Lambert Message-Id: <199812011857.LAA26942@usr07.primenet.com> Subject: Re: System V init (was: Linux to be deployed in Mexican schools; Where was FreeBSD?) To: adrian@ubergeeks.com Date: Tue, 1 Dec 1998 18:57:30 +0000 (GMT) Cc: eivind@yes.no, rssh@grad.kiev.ua, grog@lemis.com, dyson@iquest.net, wes@softweyr.com, tlambert@primenet.com, hackers@FreeBSD.ORG In-Reply-To: from "ADRIAN Filipi-Martin" at Dec 1, 98 02:15:05 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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