Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jul 1995 10:19:38 -0400
From:      Garrett Wollman <wollman@halloran-eldar.lcs.mit.edu>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>, current@freebsd.org
Subject:   Re: Knobs in /etc/sysconfig 
Message-ID:  <9507251419.AA06573@halloran-eldar.lcs.mit.edu>
In-Reply-To: <3089.806642464@time.cdrom.com>
References:  <199507250250.TAA20607@gndrsh.aac.dev.com> <3089.806642464@time.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Mon, 24 Jul 1995 20:21:04 -0700, "Jordan K. Hubbard" <jkh@time.cdrom.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9507251419.AA06573>