From owner-svn-src-all@freebsd.org Wed Oct 19 20:26:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9831CC18495; Wed, 19 Oct 2016 20:26:59 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5925C1FB2; Wed, 19 Oct 2016 20:26:59 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id EB9BC35; Wed, 19 Oct 2016 22:26:56 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id DA93428494; Wed, 19 Oct 2016 22:26:56 +0200 (CEST) Date: Wed, 19 Oct 2016 22:26:56 +0200 From: Jilles Tjoelker To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r307469 - head/etc Message-ID: <20161019202656.GA58917@stack.nl> References: <201610170407.u9H47D5n033011@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201610170407.u9H47D5n033011@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 20:26:59 -0000 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