From owner-svn-src-all@freebsd.org Mon Jan 4 17:09:01 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 9CFA9A61044 for ; Mon, 4 Jan 2016 17:09:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x22d.google.com (mail-qg0-x22d.google.com [IPv6:2607:f8b0:400d:c04::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 568F91C0B for ; Mon, 4 Jan 2016 17:09:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qg0-x22d.google.com with SMTP id e32so168178090qgf.3 for ; Mon, 04 Jan 2016 09:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=/fGWm9Dquj4lxDdkOIIHqJTCMVWiZay2DsVlt61cwuQ=; b=XwFvNp2Lk7tZWxJBdiU1JezjPY/8HfVjMMa+70nJpm1jJfclvPzT/sZq9eCEX6fx/x P0oWuQPDHrl7dsGves18hMJxnOm8DXtvLVt3zQAgcsIbSo5BfjuS55nSoGL9JK+CJ9tA qCNaRSGtv5Kjo4AfucvlFA34Brb9dZmHCwOpuJ1ofaKE/QfuoKNQqggBxS/GHYI83QVk qsMZrbJEdYSnrdzsFLWmNGEdH7Gr6v9U48xyK2g790nX2OZ4hdJZwHUV4xLHsbDlspkH e3nEpIZSWYJhaeUWd/h4FxynSHrZ3yiNRa/TJWQ4zBLgbiQ8hI9hUBM+4bPSwtx3ez/g uJDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/fGWm9Dquj4lxDdkOIIHqJTCMVWiZay2DsVlt61cwuQ=; b=bSzBhC57ybY1utYe+IhuVNWeW11SSdJjpu7bCX/k69x60mn5sIxHZZNTryYfl+uEhI 0ps1M8Uc+2cbcBJWeI6/gv6pqUk5fpwiuRQS0g86iepaoPz+MXOBnKzWR0xGuFiJ1sRT vmToXTKJJyZqtr+KjCz0WRjMm9ZRNWxFZrMeD3Ccul7nEaukm6jGoeqMBBgXqW6QjyRP 7dp4/g41HyeQOATrJX4ZZqnDH//gFcDmVbDwc/ULRJmmVPJjB5S+Po1o6ljEO0O0wo14 3LA3b2p/yNsAEfPjJBRZY6jsRrYU0LoAr3IYxGqeLPm8aw/S/2j6kOqoxqB9v/8QYnEe RYxw== X-Gm-Message-State: ALoCoQmomduWkGHGV1anhaJOPWyCY62nhgLPhI/gKlRQF2KA3Gn/v4VjmI+PRQar7c8KtYHwG1pcNvG7WrrUZgXpUuBhSLrUpw== MIME-Version: 1.0 X-Received: by 10.140.141.138 with SMTP id 132mr14429013qhn.74.1451927340411; Mon, 04 Jan 2016 09:09:00 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Mon, 4 Jan 2016 09:09:00 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <000001520d9553a7-b3ef495a-89d6-44ec-91c1-c4f9afc2c55b-000000@email.amazonses.com> References: <201601031918.u03JImBs012182@repo.freebsd.org> <000001520d9553a7-b3ef495a-89d6-44ec-91c1-c4f9afc2c55b-000000@email.amazonses.com> Date: Mon, 4 Jan 2016 10:09:00 -0700 X-Google-Sender-Auth: HW5l5CK01HQTVlpQkVDodX2-Or8 Message-ID: Subject: Re: svn commit: r293115 - head/etc From: Warner Losh To: Colin Percival Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 04 Jan 2016 17:09:01 -0000 On Mon, Jan 4, 2016 at 10:00 AM, Colin Percival wrote: > On 01/03/16 11:18, Warner Losh wrote: > > Log: > > Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked > > up and can cause issues on boot with the prompts. > > Huh, I never realized that could be a problem. It can, but it was a false positive here. /bin/sh always sources them, so if you'd added an alias, it would be hit here. > > > Fix the read-only > > root case with horrible kludge of mounting rw removing the files, then > > mounting ro. > > The solution I intended when I introduced this (and used elsewhere) was to > set $firstboot_sentinel in /etc(/defaults)?/rc.conf. This case is > precisely > why it's a shell variable, in fact. Except that's not exactly useful. NanoBSD boots with no filesystems writable that are permanent. So I could set it to /var/firstboot or something like that, and the error would go away. However, that wouldn't solve the problem because /var is repopulated from base seed files every boot with NanoBSD so we'd get firstboot behavior on every single boot. Or, we could remount / rw and remove the file and remount it ro when a read-only root was requested. I wondered to myself why we didn't use the same mechanism as nextboot for this feature. Do you know? Warner