From owner-svn-src-all@freebsd.org Thu Oct 20 22:00: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 5B7B1C1B0A5; Thu, 20 Oct 2016 22:00: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 29BB4A26; Thu, 20 Oct 2016 22:00: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 A5C35272C; Fri, 21 Oct 2016 00:00:47 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 9A59028494; Fri, 21 Oct 2016 00:00:47 +0200 (CEST) Date: Fri, 21 Oct 2016 00:00:47 +0200 From: Jilles Tjoelker To: Warner Losh Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r307469 - head/etc Message-ID: <20161020220047.GA68806@stack.nl> References: <201610170407.u9H47D5n033011@repo.freebsd.org> <20161019202656.GA58917@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Thu, 20 Oct 2016 22:00:59 -0000 On Wed, Oct 19, 2016 at 04:45:21PM -0600, Warner Losh wrote: > What missing quotes? It seemed to work find on the system I brought up... In ${root_rw_mount#[Yy][Ee][Ss]} with root_rw_mount=YES, the substring operation results in an empty string, which is removed because there are no quotes. This makes the test expression invalid. The result, with /firstboot existing, is two messages "[: =: unexpected operator" and an attempt to mount / read-only. > I didn't do the case statement because it would be three extra big > useless syntactical boogers in the code :) Fair enough. > I do like the idea of using checkyesno. It probably makes sense to change etc/rc.d/root to use checkyesno. This ensures behaviour with invalid values is exactly the same. -- Jilles Tjoelker