Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Oct 2016 18:00:10 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307826 - head/etc
Message-ID:  <201610231800.u9NI0ATu093332@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 ''



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