Date: Thu, 17 Sep 2009 18:55:11 +1000 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: Doug Barton <dougb@freebsd.org> Cc: freebsd-stable@freebsd.org, Oliver Fromme <olli@lurza.secnetix.de>, Cezary Morga <cm@therek.net> Subject: Re: 8.0 rc.d scripts less verbose? Message-ID: <20090917183525.O73400@sola.nimnet.asn.au> In-Reply-To: <4AB17CB9.3040704@FreeBSD.org> References: <op.u0aywxkp8527sy@82-170-177-25.ip.telfort.nl> <4AAFED75.4020502@andric.com> <4AB099BB.9040603@therek.net> <4AB17CB9.3040704@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Sep 2009, Doug Barton wrote: > Cezary Morga wrote: > > Dimitry Andric pisze: > >> Index: etc/rc.subr > >> =================================================================== > >> --- etc/rc.subr (revision 196888) > >> +++ etc/rc.subr (working copy) > >> @@ -680,7 +680,7 @@ run_rc_command() > >> > >> # setup the full command to run > >> # > >> - [ -z "${rc_quiet}" ] && echo "Starting ${name}." > >> + echo "Starting ${name}." > >> if [ -n "$_chroot" ]; then > >> _doit="\ > >> ${_nice:+nice -n $_nice }\ > > > > Wouldn't it be easier to set rc_quiet to zero-length value, like > > rc_quiet=""? > > That actually would give off too much information because rc_quiet > suppresses error messages about scripts that don't currently have > _enable set to anything useful. That's arguably a bug, but it's a bug > that we've come to depend on. > > The attached patch adds a knob you can set in rc.conf to see "Starting > foo" messages again. If people find this useful I'll be glad to commit > it. I'm also open to suggestions for a better name. >From your patch: - [ -z "${rc_quiet}" ] && echo "Starting ${name}." + [ -z "${rc_quiet}" -o -n "${rc_starting}" ] && echo "Starting ${name}." Presumably this variable would go in /etc/defaults/rc.conf .. seems that all the other rc.conf binary choices are either set "YES" or "NO" rather than something or empty, so perhaps more consistent with that might be: [ -z "${rc_quiet}" -o "${rc_starting}" = "YES" ] && echo "Starting ${name}." As for name, not fussed, but maybe rc_startmsgs maybe more indicative? Also, I agree with Oliver; YES should probably be the default (POLA) so folks annoyed by 'too much information' in console.log can disable it. HTH, Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090917183525.O73400>