Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Apr 2018 16:59:10 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332037 - stable/11/etc
Message-ID:  <201804041659.w34GxAep018403@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Wed Apr  4 16:59:10 2018
New Revision: 332037
URL: https://svnweb.freebsd.org/changeset/base/332037

Log:
  MFC r307826,r328949: Firstboot fs mount changes
  
  MFC r307826: Use checkyesno instead of rolling my own..
  
  MFC r328949: Fix firstboot fs mount logic
  
  The firstboot logic has an error which causes the filesystem to be
  mounted readonly even though root_rw_mount=YES. This fixes the error to
  ensure that the root filesystem is mounted rw as expected after the run
  of the firstboot scripts.

Modified:
  stable/11/etc/rc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc
==============================================================================
--- stable/11/etc/rc	Wed Apr  4 16:28:30 2018	(r332036)
+++ stable/11/etc/rc	Wed Apr  4 16:59:10 2018	(r332037)
@@ -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?201804041659.w34GxAep018403>