On Mon, Oct 17, 2016 at 04:07:13AM +0000, Warner Losh wrote: > Author: imp > Date: Mon Oct 17 04:07:13 2016 > New Revision: 307469 > URL: https://svnweb.freebsd.org/changeset/base/307469
> Log: > Allow root_rw_mount to be both lower and upper case. Before, if it was > upper case, you'd wind up with a read-only filesystem when you should > sometimes. > PR: 213549 > Modified: > head/etc/rc > Modified: head/etc/rc > ============================================================================== > --- head/etc/rc Mon Oct 17 04:07:12 2016 (r307468) > +++ head/etc/rc Mon Oct 17 04:07:13 2016 (r307469) > @@ -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} = "yes" ] || mount -uw / > + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || 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} = "yes" ] || mount -ur / > + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / > kill -INT 1 > fi > - [ ${root_rw_mount} = "yes" ] || mount -ur / > + [ ${root_rw_mount#[Yy][Ee][Ss]} = "" ] || mount -ur / > fi > > echo '' Although I have not tested this, it looks like this will always do the remounts since the condition is either false or invalid due to missing quotes. Perhaps we can use the checkyesno function from rc.subr or use the same check that rc.d/root uses (case statement where [Nn][Oo] and the empty string are no and the rest is yes). -- Jilles Tjoelker _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"