From owner-freebsd-hackers Tue Nov 17 21:49:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA21106 for freebsd-hackers-outgoing; Tue, 17 Nov 1998 21:49:00 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from lorax.ubergeeks.com (lorax.ubergeeks.com [206.205.41.241]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA21101 for ; Tue, 17 Nov 1998 21:48:58 -0800 (PST) (envelope-from adrian@lorax.ubergeeks.com) Received: from localhost (adrian@localhost) by lorax.ubergeeks.com (8.8.8/8.8.8) with SMTP id AAA01549; Wed, 18 Nov 1998 00:47:26 -0500 (EST) (envelope-from adrian@lorax.ubergeeks.com) Date: Wed, 18 Nov 1998 00:47:26 -0500 (EST) From: ADRIAN Filipi-Martin Reply-To: Adrian Filipi-Martin To: Gary Kline cc: Jamie Lawrence , Jacques Vidrine , Nik Clayton , hackers@FreeBSD.ORG Subject: Re: /etc/rc.d, and changes to /etc/rc? In-Reply-To: <19981117193824.A29415@thought.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 17 Nov 1998, Gary Kline wrote: > > I think the big win here is a common framework for handling what can > > become highly complex daemon start/stop procedures. One that I've > > ended up doing is database daemons. Example: you want to kill msql > > for whatever reason. It serves some fast CGIs that in turn provide > > functionality to web users at large. A stop procedure for this daemon > > involves killing the fcgis, killing the DB daemon, moving a "service > > unavailable" page into the docroot (or some other mechanism for end > > user notification), and possibly other tasks. Right now, everyone who > > builds a script for this does it differently. With a rc.d framework, > > this sort of problem becomes much more standardized, as admins will > > tend to build them into that framework. > > > > I think the real tradeoff is between homegrown complexity that > > often is under documented and homegrown complexity that at least > > follow conventions that are easy to follow. I don't see where the above would ever be anything but a homegrown script. If you want fancy do-it-all scripts, go for it. This is exactly why I dislike start/stop scripts. Most of them lump several realted but independent processes together. > > This is one of the few places I actually prefer Solaris to FreeBSD > > (run state madness notwithstanding). Well, take a look at HP-UX's start/stop and init levels. It actually works much better and is more orthogonal than Solaris. I find it rather messy and I had to rewrite scripts because Solaris doesn't honor the #! at the beginning of the scripts. > The commonality is the major win, I think. Either the BSD > world moves to the SysV model, or Sun and SCO and AIX and > Linux should adopt our model. By all means, let them come. I just double checked and on out AIX boxes (4.2) I can not find hide nor hair of a start/stop script. There are, however, a nice familiar set of rc.whatver scripts. If AIX had start/stop in the past they seem to have gotten rid of it. While I don't maintain out AIX boxes, I don't think the poeple who do rewote AIX's init. Most vendors that have start/stop scripts don't do a good job at it. The ratsnest of sym/hard links is ridiculous and finding where a start/stop script is run from is annoying. Now, consider the following. Total lines in FreeBSD-2.2.6 /etc/rc.* 320 rc 153 rc.conf 155 rc.conf.previous 176 rc.firewall 116 rc.i386 24 rc.local 261 rc.network 15 rc.pccard 127 rc.serial 1347 total Total lines in IRIX 6.5's /etc/{b,}rc* and init.d scripts: 92 brc 51 rc0 86 rc2 30 rc3 .... 66 init.d/videod 44 init.d/webface 33 init.d/xdm 4873 total I think it would be fair to say the number of lines of rc-code would be substantially larger under FreeBSD if converted to start/stop scripts. The brevity and flexability is one of the current BSD rc files. Adrian -- [ adrian@ubergeeks.com -- Ubergeeks Consulting -- http://www.ubergeeks.com/ ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message