Date: Wed, 18 Nov 1998 00:47:26 -0500 (EST) From: ADRIAN Filipi-Martin <adrian@ubergeeks.com> To: Gary Kline <kline@thought.org> Cc: Jamie Lawrence <jal@ThirdAge.com>, Jacques Vidrine <n@nectar.com>, Nik Clayton <nik@nothing-going-on.demon.co.uk>, hackers@FreeBSD.ORG Subject: Re: /etc/rc.d, and changes to /etc/rc? Message-ID: <Pine.BSF.3.96.981118001620.1471B-100000@lorax.ubergeeks.com> In-Reply-To: <19981117193824.A29415@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.981118001620.1471B-100000>
