Date: Thu, 8 Jul 2010 13:34:01 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r209798 - in stable/7/etc: . rc.d Message-ID: <201007081334.o68DY1OC024841@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Jul 8 13:34:01 2010 New Revision: 209798 URL: http://svn.freebsd.org/changeset/base/209798 Log: MFC 175676: Implement a quiet prefix, which will disable some diagnostics. The fast prefix also implies quiet. During boot we use either fast or quiet. For shutdown we already use 'faststop'. So, this informational message should only appear during interactive use. Reviewed by: silence on freebsd-rc@ Modified: stable/7/etc/rc stable/7/etc/rc.d/netif stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc ============================================================================== --- stable/7/etc/rc Thu Jul 8 13:07:40 2010 (r209797) +++ stable/7/etc/rc Thu Jul 8 13:34:01 2010 (r209798) @@ -56,7 +56,7 @@ if [ "$1" = autoboot ]; then rc_fast=yes # run_rc_command(): do fast booting else autoboot=no - _boot="start" + _boot="quietstart" fi dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` Modified: stable/7/etc/rc.d/netif ============================================================================== --- stable/7/etc/rc.d/netif Thu Jul 8 13:07:40 2010 (r209797) +++ stable/7/etc/rc.d/netif Thu Jul 8 13:34:01 2010 (r209798) @@ -72,7 +72,7 @@ network_start() if [ -f /etc/rc.d/ipfilter ] ; then # Resync ipfilter - /etc/rc.d/ipfilter fastresync + /etc/rc.d/ipfilter quietresync fi if [ -f /etc/rc.d/bridge -a -n "$cmdifn" ] ; then /etc/rc.d/bridge start $cmdifn Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Thu Jul 8 13:07:40 2010 (r209797) +++ stable/7/etc/rc.subr Thu Jul 8 13:34:01 2010 (r209798) @@ -381,9 +381,10 @@ wait_for_pids() # If argument has a given prefix, then change the operation as follows: # Prefix Operation # ------ --------- -# fast Skip the pid check, and set rc_fast=yes +# fast Skip the pid check, and set rc_fast=yes, rc_quiet=yes # force Set ${rcvar} to YES, and set rc_force=yes # one Set ${rcvar} to YES +# quiet Don't output some diagnostics, and set rc_quiet=yes # # The following globals are used: # @@ -526,6 +527,8 @@ wait_for_pids() # # rc_force Not empty if "force" was provided (q.v.) # +# rc_quiet Not empty if "quiet" was provided +# # run_rc_command() { @@ -546,6 +549,7 @@ run_rc_command() fast*) # "fast" prefix; don't check pid rc_arg=${rc_arg#fast} rc_fast=yes + rc_quiet=yes ;; force*) # "force prefix; always run rc_force=yes @@ -562,6 +566,11 @@ run_rc_command() eval ${rcvar}=YES fi ;; + quiet*) # "quiet" prefix; omit some messages + _rc_prefix=quiet + rc_arg=${rc_arg#${_rc_prefix}} + rc_quiet=yes + ;; esac eval _override_command=\$${name}_program @@ -616,7 +625,7 @@ run_rc_command() # if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then - if [ -n "$rc_fast" ]; then + if [ -n "${rc_quiet}" ]; then return 0 fi echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to "
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007081334.o68DY1OC024841>