From owner-freebsd-hackers Sat Jan 30 09:08:37 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA12046 for freebsd-hackers-outgoing; Sat, 30 Jan 1999 09:08:37 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from obie.softweyr.com ([204.68.178.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA12040 for ; Sat, 30 Jan 1999 09:08:32 -0800 (PST) (envelope-from wes@softweyr.com) Received: from softweyr.com (zaphod.softweyr.com [204.68.178.35]) by obie.softweyr.com (8.8.8/8.8.8) with ESMTP id KAA06268; Sat, 30 Jan 1999 10:06:53 -0700 (MST) (envelope-from wes@softweyr.com) Message-ID: <36B33C2B.CDB07CCB@softweyr.com> Date: Sat, 30 Jan 1999 10:06:51 -0700 From: Wes =?iso-8859-1?Q?Peters=D4?==?iso-8859-1?Q?=40=21=EA?= =?iso-8859-1?Q?=80?==?iso-8859-1?Q?=EA?==?iso-8859-1?Q?=80=DD=E7?= =?iso-8859-1?Q?=805=EA?==?iso-8859-1?Q?=C0?==?iso-8859-1?Q?=EA?= Organization: Softweyr llc X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 3.0-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: "Daniel C. Sobral" CC: Brandon Gillespie , Robert Withrow , freebsd-hackers@FreeBSD.ORG Subject: Re: more modular rc/init/uninit system... References: <36B1739E.1A22A983@urc.ac.ru> <199901291406.JAA27108@spooky.rwwa.com> <19990129115122.A25989@cold.org> <36B2CD01.69CFEFA8@newsguy.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Daniel C. Sobral" wrote: > > Brandon Gillespie wrote: > > > > Following the idea of just modularizing the executable part of > > /etc/rc*, there are two options: 1) make Yet Another Standard, or > > 2. follow an existing and widely accepted standard, at least loosely. > > > > I believe 2. to be the better option, and thus suggested putting the > > scripts in /sbin/init.d and /sbin/rc.d (symlinked to init.d). > > Furthermore, as I stated in the web page the scripts *should not be > > changed* The only role they play is _order_. Whether something runs > > or not is managed by the config script. Because of this the admin > > should really _never_ have to touch the symlinks (unless they are > > making something new). > > SYSV way is confusing. More than that, SYSV is a *hack*. While it > may do whatever it was supposed to do, it's deficiencies make clear > that it was, at best, a good first try. I don't see why we have to > stick to a hack just because it was the first implementation tried. The idea of ordering the startup and shutdown is a good one, but the way it was solved in SYSV is really goofy. Good ole USL strikes again. ;^) > FreeBSD's way is good, though it simply does not try to solve some > of the problems SYSV way tries to. If we are going to change the > *GOOD WAY* we do things now, we better change to *ANOTHER GOOD WAY*. > SYSV way is, thus, not acceptable. Agreed. If we're going to hack this, we should hack it better, not just different. I like the idea of modularizing the different parts of the rc files so you can re-run just one, or shutdown and startup up subsystems all by themselves. > > I do like the dependancy and register parts, however. > > The problem with dependencies is that you need to build a graph, so > you know how to shutdown a service, while correctly shuting down > everything that depended on it (which the service is most likely to > *not* know -- take, for instance, the networking stack). And wouldn't you know it, we already have a tool for managing dependency graphs. ;^) How about a Makefile, with "startup" and "shutdown" targets, and individual "start" and "stop" targets for each subsystem? The configuration settings would remain in rc.conf and rc.conf.local, where they belong, and each "subsystem" startup moved to an individual script. /etc/rc would bring the system up just far enough for make to function, and then cd /etc; make startup. You could start a particular subsystem, or shut it down, with i.e. "make start.nfsserver" or "make stop.nfsserver". Good? Bad? Indifferent? -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://www.softweyr.com/~softweyr wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message