Re: RFC: support for "first boot" rc.d scripts

From: Colin Percival <cperciva_at_freebsd.org>
Date: Tue, 15 Oct 2013 14:12:18 -0700
On 10/15/13 13:09, Matthew Fleming wrote:
> We use something like this at work.  However, our version creates a file after
> the firstboot scripts have run, and doesn't run if the file exists.
> 
> Is there a reason to prefer one choice over the other?  Naively I'd expect it to
> be better to run when the file doesn't exist, creating when done; it solves the
> problem of making sure the magic file exists before first boot, for the other
> polarity.

I don't see that making sure that the magic file exists is a problem, since
you'd also need to make sure you have knobs turned on in /etc/rc.conf and/or
extra rc.d scripts installed.

In a very marginal sense, deleting a file is safer than creating one, since if
the filesystem is full you can delete but not create.  It also seems to me that
the sensible polarity is that having something extra lying around makes extra
things happen rather than inhibiting them.

But probably the best argument has to do with upgrading systems -- if you update
a 9.2-RELEASE system to 10.1-RELEASE and there's a "first boot" script in that
new release, you don't want to have it accidentally get run simply because you
failed to create a /firstboot file during the upgrade process.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
Received on Tue Oct 15 2013 - 19:13:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:43 UTC