Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2008 21:46:42 +0300
From:      Mike Makonnen <mtm@FreeBSD.Org>
To:        freebsd-rc <freebsd-rc@freebsd.org>
Cc:        scottl@freebsd.org, Brooks Davis <brooks@freebsd.org>
Subject:   Re: cvs commit: src/etc rc.subr
Message-ID:  <1201286802.2865.8.camel@mercury>
In-Reply-To: <20080125160412.GA36311@lor.one-eyed-alien.net>
References:  <200801251506.m0PF6Qwf043571@repoman.freebsd.org> <20080125152102.GD6064@submonkey.net> <20080125160412.GA36311@lor.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-fXTbhac/7/bQlP6pFhdX
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


On Fri, 2008-01-25 at 10:04 -0600, Brooks Davis wrote:
> On Fri, Jan 25, 2008 at 03:21:02PM +0000, Ceri Davies wrote:
> > On Fri, Jan 25, 2008 at 03:06:26PM +0000, Mike Makonnen wrote:
> > > mtm         2008-01-25 15:06:26 UTC
> > > 
> > >   FreeBSD src repository
> > > 
> > >   Modified files:
> > >     etc                  rc.subr 
> > >   Log:
> > >   If the rc.conf(5) variable for a script is not enabled do not fail
> > >   silently. Display a message that the command wasn't run and make
> > >   possible suggestions for what to do.
> > 
> > Any chance that we could make this behaviour dependent on some other
> > variable (or not do it)?  It's going to make booting look pretty nasty.
> 
> The other option I'd considered was to create a quiet precmd that works like
> force and use quietstart/quitestop for boot.  I've become convinced this is the
> right interactive behavior.
> 
> -- Brooks
> 
> > Ceri
> > 
> > > | @@ -606,6 +606,9 @@ run_rc_command()
> > > |  					#
> > > |  	if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then
> > > |  		if ! checkyesno ${rcvar}; then
> > > | +			echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to "
> > > | +			echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' "
> > > | +			echo "instead of '${rc_arg}'."
> > > |  			return 0
> > > |  		fi
> > > |  	fi
> > 

Ok, I went with brooks@'s suggestion and instead implemented a quiet
prefix. In addition, I also made the 'fast' prefix imply 'quiet'.

Something else this buys us is that we now have a knob that we can put a
lot of diagnostic messages behind to "de-clutter" the console during
boot and shutdown.
Patch is attached.

Cheers.
-- 
Mike Makonnen         | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc
mmakonnen @ gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55
mtm @ FreeBSD.Org     | FreeBSD - http://www.freebsd.org

--=-fXTbhac/7/bQlP6pFhdX
Content-Disposition: attachment; filename=rc.d-quiet.diff
Content-Type: text/x-patch; name=rc.d-quiet.diff; charset=us-ascii
Content-Transfer-Encoding: base64

SW5kZXg6IGV0Yy9yYw0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9ob21lL25jdnMvc3JjL2V0Yy9y
Yyx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMzQwDQpkaWZmIC11IC1yMS4zNDAgcmMNCi0tLSBl
dGMvcmMJMiBBcHIgMjAwNyAyMjo1MzowNiAtMDAwMAkxLjM0MA0KKysrIGV0Yy9yYwkyNSBKYW4g
MjAwOCAxODowMjoxNCAtMDAwMA0KQEAgLTU2LDcgKzU2LDcgQEANCiAJcmNfZmFzdD15ZXMgICAg
ICAgICMgcnVuX3JjX2NvbW1hbmQoKTogZG8gZmFzdCBib290aW5nDQogZWxzZQ0KIAlhdXRvYm9v
dD1ubw0KLQlfYm9vdD0ic3RhcnQiDQorCV9ib290PSJxdWlldHN0YXJ0Ig0KIGZpDQogDQogZGx2
PWAvc2Jpbi9zeXNjdGwgLW4gdmZzLm5mcy5kaXNrbGVzc192YWxpZCAyPiAvZGV2L251bGxgDQpJ
bmRleDogZXRjL3JjLnN1YnINCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09P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AJZmkNCkluZGV4OiBldGMvcmMuZC9uZXRpZg0KPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZp
bGU6IC9ob21lL25jdnMvc3JjL2V0Yy9yYy5kL25ldGlmLHYNCnJldHJpZXZpbmcgcmV2aXNpb24g
MS4yNA0KZGlmZiAtdSAtcjEuMjQgbmV0aWYNCi0tLSBldGMvcmMuZC9uZXRpZgkyNSBKdWwgMjAw
NyAxODowODowMSAtMDAwMAkxLjI0DQorKysgZXRjL3JjLmQvbmV0aWYJMjUgSmFuIDIwMDggMTg6
MzM6MDYgLTAwMDANCkBAIC03Miw3ICs3Miw3IEBADQogDQogCWlmIFsgLWYgL2V0Yy9yYy5kL2lw
ZmlsdGVyIF0gOyB0aGVuDQogCQkjIFJlc3luYyBpcGZpbHRlcg0KLQkJL2V0Yy9yYy5kL2lwZmls
dGVyIHJlc3luYw0KKwkJL2V0Yy9yYy5kL2lwZmlsdGVyIHF1aWV0cmVzeW5jDQogCWZpDQogCWlm
IFsgLWYgL2V0Yy9yYy5kL2JyaWRnZSAtYSAtbiAiJGNtZGlmbiIgXSA7IHRoZW4NCiAJCS9ldGMv
cmMuZC9icmlkZ2Ugc3RhcnQgJGNtZGlmbg0K


--=-fXTbhac/7/bQlP6pFhdX--



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