From owner-freebsd-current Tue Jul 25 07:19:52 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id HAA25778 for current-outgoing; Tue, 25 Jul 1995 07:19:52 -0700 Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id HAA25772 for ; Tue, 25 Jul 1995 07:19:49 -0700 Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.3.6) id AA06573; Tue, 25 Jul 1995 10:19:38 -0400 Date: Tue, 25 Jul 1995 10:19:38 -0400 From: Garrett Wollman Message-Id: <9507251419.AA06573@halloran-eldar.lcs.mit.edu> To: "Jordan K. Hubbard" Cc: "Rodney W. Grimes" , current@freebsd.org Subject: Re: Knobs in /etc/sysconfig In-Reply-To: <3089.806642464@time.cdrom.com> References: <199507250250.TAA20607@gndrsh.aac.dev.com> <3089.806642464@time.cdrom.com> Sender: current-owner@freebsd.org Precedence: bulk < said: > # Fill in the types of local startup scripts you have > LOCAL_SCRIPTS= network i386 > if [ -d /etc/rc.locald ]; then \ > for i in ${LOCAL_SCRIPTS}; do \ > if [ -f /etc/rc.locald/$$i ]; then \ > sh /etc/rc.locald/$$i; \ > fi \ > done \ > fi If you're going to go this far in the SysV direction (and in this one particular case it's not unreasonable), I would far rather have something like: if [ -d /etc/rc.local.d ]; then for script in /etc/rc.local.d/*.sh; do [ -x $script ] && $script start done fi if [ -x /etc/rc.local ]; then /etc/rc.local fi The first part is almost like what SysV implementations do, only it's Emacs-safe. (Obviously, I would expect the scripts to understand `restart' and `stop' as well as `start'.) I put in the `test -x' part to make it trivial to turn these things on and off as necessary. > I rather like the /etc/sysconfig.local idea, but I'd still prefer to > couple it with something like the above rather than tossing all the > knob-ends into /etc/rc.local. Sticking them into a subdir means less > things we'll have to contend with overlaying when upgrading. I don't like the idea of /etc/sysconfig.local as a dumping-ground for third-party software configuration options. Either there should be a third-party section in the real /etc/sysconfig, or there should be a separate config file for each service (/etc/rc.local.d/$service.cf?). I lean towards the former. -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant