summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorkevans <kevans@FreeBSD.org>2018-04-04 16:59:10 +0000
committerkevans <kevans@FreeBSD.org>2018-04-04 16:59:10 +0000
commit925513040636b5579d792cf38c7362899abc7103 (patch)
tree0d90c16c64dc2621b06abc431580ef8d345c290c /etc
parent5ec3811964aea39995dd4808597840472917ea9a (diff)
downloadFreeBSD-src-925513040636b5579d792cf38c7362899abc7103.zip
FreeBSD-src-925513040636b5579d792cf38c7362899abc7103.tar.gz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index 278c9de..69edcf4 100644
--- a/etc/rc
+++ b/etc/rc
@@ -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 ''
OpenPOWER on IntegriCloud