Date: Wed, 16 Sep 2009 17:03:05 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Cezary Morga <cm@therek.net> Cc: freebsd-stable@freebsd.org Subject: Re: 8.0 rc.d scripts less verbose? Message-ID: <4AB17CB9.3040704@FreeBSD.org> In-Reply-To: <4AB099BB.9040603@therek.net> References: <op.u0aywxkp8527sy@82-170-177-25.ip.telfort.nl> <4AAFED75.4020502@andric.com> <4AB099BB.9040603@therek.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------000204070209060606020204
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
First off, this discussion should actually have been on
freebsd-current@ until 8.0-RELEASE is done, but that's a minor issue.
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.
Doug
--
This .signature sanitized for your protection
--------------000204070209060606020204
Content-Type: text/plain;
name="rc.subr-starting.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="rc.subr-starting.diff"
--- /usr/src/etc/rc.subr 2009-09-16 14:18:07.000000000 -0700
+++ rc.subr 2009-09-16 16:56:39.000000000 -0700
@@ -708,7 +708,7 @@
# setup the full command to run
#
- [ -z "${rc_quiet}" ] && echo "Starting ${name}."
+ [ -z "${rc_quiet}" -o -n "${rc_starting}" ] && echo "Starting ${name}."
if [ -n "$_chroot" ]; then
_doit="\
${_nice:+nice -n $_nice }\
--------------000204070209060606020204--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AB17CB9.3040704>
