svn commit: r307826 - head/etc

Warner Losh imp at FreeBSD.org
Sun Oct 23 18:00:11 UTC 2016


Author: imp
Date: Sun Oct 23 18:00:09 2016
New Revision: 307826
URL: https://svnweb.freebsd.org/changeset/base/307826

Log:
  Use checkyesno instead of rolling my own..

Modified:
  head/etc/rc

Modified: head/etc/rc
==============================================================================
--- head/etc/rc	Sun Oct 23 18:00:08 2016	(r307825)
+++ head/etc/rc	Sun Oct 23 18:00:09 2016	(r307826)
@@ -135,16 +135,16 @@ done
 # Note: this assumes firstboot_sentinel is on / when we have
 # a read-only /, or that it is on media that's writable.
 if [ -e ${firstboot_sentinel} ]; then
-	[ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -uw /
+    	checkyesno root_rw_mount && mount -uw /
 	chflags -R 0 ${firstboot_sentinel}
 	rm -rf ${firstboot_sentinel}
 	if [ -e ${firstboot_sentinel}-reboot ]; then
 		chflags -R 0 ${firstboot_sentinel}-reboot
 		rm -rf ${firstboot_sentinel}-reboot
-		[ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur /
+    		checkyesno root_rw_mount && mount -ur /
 		kill -INT 1
 	fi
-	[ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur /
+    	checkyesno root_rw_mount && mount -ur /
 fi
 
 echo ''


More information about the svn-src-head mailing list