Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jun 2010 17:35:41 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-rc@freebsd.org
Subject:   Re: Lots of spurious errors when booting from single user mode on stable/7
Message-ID:  <201006301735.42079.jhb@freebsd.org>
In-Reply-To: <201006041551.14980.jhb@freebsd.org>
References:  <201006041551.14980.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 04 June 2010 3:51:14 pm John Baldwin wrote:
> Can someone look at MFC'ing 175676 to stable/7?  It fixes the problem 
> currently in stable/7 (but not in 8 or 9) that if you boot to single user mode 
> (e.g. to manually run fsck) and then exit the shell to enter multiuser, every 
> single rc.d script that is not enabled in /etc/rc.conf emits a warning about 
> the 'foo_enable' variable not being set to yes.  This is because the non-fast 
> boot uses 'start' rather than 'faststart'.  The SVN revision adds a 'quiet' 
> prefixed set of commands and uses 'quietstart' instead of 'start' for this 
> case.

Unless anyone strongly objects, I will commit this to 7 which MFC's 175676
and fixes this issue:

Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /head/etc:r175676

Index: rc
===================================================================
--- rc	(revision 209571)
+++ rc	(working copy)
@@ -56,7 +56,7 @@
 	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`
Index: rc.d/netif
===================================================================
--- rc.d/netif	(revision 209571)
+++ rc.d/netif	(working copy)
@@ -72,7 +72,7 @@
 
 	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
Index: rc.subr
===================================================================
--- rc.subr	(revision 209571)
+++ rc.subr	(working copy)
@@ -381,9 +381,10 @@
 #	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,7 +527,9 @@
 #
 #	rc_force	Not empty if "force" was provided (q.v.)
 #
+#	rc_quiet	Not empty if "quiet" was provided
 #
+#
 run_rc_command()
 {
 	_return=0
@@ -546,6 +549,7 @@
 	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 @@
 			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 @@
 					#
 		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 "

-- 
John Baldwin



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