Use checkyesno instead of rolling my own..

This commit is contained in:
Warner Losh 2016-10-23 18:00:09 +00:00
parent 9013696194
commit 40adda8665
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307826

6
etc/rc
View File

@ -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 ''