Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2012 12:47:57 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r231677 - in stable/8: etc etc/rc.d share/man/man8
Message-ID:  <201202141247.q1EClvFs098970@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Tue Feb 14 12:47:57 2012
New Revision: 231677
URL: http://svn.freebsd.org/changeset/base/231677

Log:
  MFH r230007, r230388: document quiet*, fix devd/dhclient interaction.

Modified:
  stable/8/etc/rc.d/dhclient
  stable/8/etc/rc.subr
  stable/8/share/man/man8/rc.subr.8
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/share/man/   (props changed)
  stable/8/share/man/man8/   (props changed)

Modified: stable/8/etc/rc.d/dhclient
==============================================================================
--- stable/8/etc/rc.d/dhclient	Tue Feb 14 12:43:33 2012	(r231676)
+++ stable/8/etc/rc.d/dhclient	Tue Feb 14 12:47:57 2012	(r231677)
@@ -22,7 +22,14 @@ stop_precmd="dhclient_pre_check"
 dhclient_pre_check()
 {
 	if [ -z "${rc_force}" ] && ! dhcpif $ifn; then
-		err 1 "'$ifn' is not a DHCP-enabled interface"
+		local msg
+		msg="'$ifn' is not a DHCP-enabled interface"
+		if [ -z "${rc_quiet}" ]; then
+			echo "$msg"
+		else
+			debug "$msg"
+		fi
+			exit 1
 	fi
 }
 

Modified: stable/8/etc/rc.subr
==============================================================================
--- stable/8/etc/rc.subr	Tue Feb 14 12:43:33 2012	(r231676)
+++ stable/8/etc/rc.subr	Tue Feb 14 12:47:57 2012	(r231677)
@@ -1121,7 +1121,7 @@ load_rc_config_var()
 #
 rc_usage()
 {
-	echo -n 1>&2 "Usage: $0 [fast|force|one]("
+	echo -n 1>&2 "Usage: $0 [fast|force|one|quiet]("
 
 	_sep=
 	for _elem; do

Modified: stable/8/share/man/man8/rc.subr.8
==============================================================================
--- stable/8/share/man/man8/rc.subr.8	Tue Feb 14 12:43:33 2012	(r231676)
+++ stable/8/share/man/man8/rc.subr.8	Tue Feb 14 12:47:57 2012	(r231677)
@@ -375,7 +375,7 @@ with
 being the list of valid arguments
 prefixed by
 .Sm off
-.Dq Bq Li fast | force | one .
+.Dq Bq Li fast | force | one | quiet .
 .Sm on
 .It Ic reverse_list Ar item ...
 Print the list of
@@ -463,6 +463,22 @@ Skip the checks for
 being set to
 .Dq Li YES ,
 but performs all the other prerequisite tests.
+.It Li quiet
+Inhibits some verbose diagnostics.
+Currently, this includes messages
+.Qq Starting ${name}
+(as checked by
+.Ic check_startmsgs
+inside
+.Nm )
+and errors about usage of services that are not enabled in
+.Xr rc.conf 5 .
+This prefix also sets
+.Va rc_quiet Ns = Ns Li YES .
+.Em Please, note:
+.Va rc_quiet
+is not intended to completely mask all debug and warning messages,
+but only certain small classes of them.
 .El
 .Pp
 .Ic run_rc_command



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