From owner-freebsd-current Fri Sep 8 6:34:42 2000 Delivered-To: freebsd-current@freebsd.org Received: from ns1.sunesi.net (ns1.sunesi.net [196.15.192.194]) by hub.freebsd.org (Postfix) with ESMTP id 7198037B423 for ; Fri, 8 Sep 2000 06:34:33 -0700 (PDT) Received: from nbm by ns1.sunesi.net with local (Exim 3.03 #1) id 13XOIQ-000F9S-00; Fri, 08 Sep 2000 15:34:22 +0200 Date: Fri, 8 Sep 2000 15:34:22 +0200 From: Neil Blakey-Milner To: Matthew Thyer Cc: current@freebsd.org Subject: Re: /usr/local/etc/rc.d and /etc/rc.d Message-ID: <20000908153421.A58134@mithrandr.moria.org> References: <39B8E865.B77012B@camtech.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <39B8E865.B77012B@camtech.net.au>; from thyerm@camtech.net.au on Fri, Sep 08, 2000 at 10:53:49PM +0930 Organization: Sunesi Clinical Systems X-Operating-System: FreeBSD 3.3-RELEASE i386 X-URL: http://rucus.ru.ac.za/~nbm/ Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri 2000-09-08 (22:53), Matthew Thyer wrote: > I would like to see startup and shutdown scripts exist in a single > directory ("/usr/local/etc/rc.d/" for ports and eventually > "/etc/rc.d" when the system migrates to the same scheme). I don't think we should move away from the 'base' system and 'extra' stuff differentiation. Any script that can support /etc/rc.d can probably support /usr/local/etc/rc.d, /usr/X11R6/etc/rc.d, and others based on a variable in /etc/rc.conf. > The startup and shutdown functionality would be in the same script > and the scripts should be named starting with a capital 'S' for > startup and a capital 'K' for shutdown (I'm also keen on the HPUX > startmsg and stopmsg one liners). Why not just use chmod +x or chmod -x, like we do already? This means not having to rename things. > The scripts will be differentiated from existing scripts (the old > system) as the new system will only act on scripts that have a digit > in the second character of their name (there could be a backward > compatability process to act on all the others afterwards which > would be disabled by default... presumably "disabled.S99rc.compat" > or some such name). I prefer chmod +x and chmod -x. > Stop scripts will be a symbolic link to their startup script > counterpart (and would simply not be executed if the K* file doesn't > exist). Symbolic links make it clear they are the same script. I don't see the point. > Scripts would be executed in alphabetical order (after the S or K) > so the sysadmin has control over the execution order which is > important. I'd prefer a dependency based system. (cf. Eivind Eklund's newrc, at http://people.FreeBSD.org/~eivind/newrc.tar.gz) > Scripts would source common functions from a system file so we have > control over future changes in functionality/reporting. This would > also make the template script very simple. I imagine that's the way to do it. > Eventually I would like the system to migrate to such a scheme but > maintain the backward compatibility scripts /etc/netstart which > could be implemented either by simply 'knowing' which rc scripts > do network functionality or by reserving a range of numbers for > network startup <--- HACK! This is why you want dependencies. > I'd really like the system to allow stuff like "/etc/rc.d/S84named > reread" (or "restart", "reload" whatever is acceptable). That's a natural extension to the current method, yes. We should be sure to fail on something we don't understand, and not (like we may do now) run the default start script. > I'd also really like at least named and perl to be removed from the > base system but that's another thread. I'll comment when you bring it up. Warning: perl is necessary for kernel builds. > One of the big turn offs to FreeBSD in the System V world is: > "What!, why do I need to know which signal to send blah to reload > it ?". I agree. We need a simpler system. Simple, and obvious. None of this complex symlink stuff. Neil -- Neil Blakey-Milner Sunesi Clinical Systems nbm@mithrandr.moria.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message