From owner-freebsd-arch Sun Apr 1 7:55:55 2001 Delivered-To: freebsd-arch@freebsd.org Received: from homer.softweyr.com (bsdconspiracy.net [208.187.122.220]) by hub.freebsd.org (Postfix) with ESMTP id B717937B71A for ; Sun, 1 Apr 2001 07:55:50 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from [127.0.0.1] (helo=softweyr.com ident=49497880e1b07c91fa14a3966962448d) by homer.softweyr.com with esmtp (Exim 3.16 #1) id 14jjGO-0000B1-00; Sun, 01 Apr 2001 08:55:32 -0600 Message-ID: <3AC74164.252F2166@softweyr.com> Date: Sun, 01 Apr 2001 08:55:32 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: David O'Brien Cc: Cy Schubert - ITSD Open Systems Group , Jack Rusher , Neil Blakey-Milner , Michael Lucas , "litos2001@libero.it" Subject: Re: Startup scripts a la NetBSD References: <3AC4B808.9EB5806B@integratus.com> <200103301810.f2UIAGK06787@cwsys.cwsent.com> <20010330115252.A93566@dragon.nuxi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David O'Brien wrote: > > On Fri, Mar 30, 2001 at 10:09:39AM -0800, Cy Schubert - ITSD Open Systems Group wrote: > > Becoming more SYSV-like is not something most people in FreeBSD are > > enamoured with. Hence I don't think it would be possible to implement > > all the changes I would like to see. > > Correct. Make that HELL NO WE WON'T GO SVR4!!! > > The BSD init + NetBSD granular rc files is a nice compromise. And thus > why I am pushing a move in that direction. And is pretty much what I've done for DoBox. We start virtually every server daemon on the box from an individual rc script. Ours handles the usual start and stop arguments, as well as init, which is run only during the very first system boot -- this allows packages that were installed in the system image to complete their post-install phase. We also have netstop and netstart dynamic events for when the internet interface goes down and comes back up, so we can reconfigure firewall settings, register dynamic dns, etc., if the IP address changes. We have three events related to system backup: backup, pre-restore, and post-restore, where subsystems can export data into a backup-able format, stop servers, and restart servers and import restored data. So far, it is working pretty well. I can't imagine trying to do something like this by editing a single rc file. We run 'stop' and 'restore' events in reverse alpha order and all other events in alphabetical order, making it simple to sequence the events. So far, we have only two dependencies, both of which need to be started early and stopped late, so we simply capitalized those two scripts and leave the rest lower-case. Producing a sorted list from FreeBSD's multiple rc.d directories is a simple enough process this shouldn't cause us any problems. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message