Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2013 13:09:35 -0700
From:      Matthew Fleming <mdf@FreeBSD.org>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        FreeBSD current <freebsd-current@freebsd.org>, freebsd-rc@freebsd.org
Subject:   Re: RFC: support for "first boot" rc.d scripts
Message-ID:  <CAMBSHm-YqxeVsjVXszh-4gt-doXZQVL%2BXKpx_65az8TrE_V0ow@mail.gmail.com>
In-Reply-To: <525B258F.3030403@freebsd.org>
References:  <525B258F.3030403@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 13, 2013 at 3:58 PM, Colin Percival <cperciva@freebsd.org>wrote:

> Hi all,
>
> I've attached a very simple patch which makes /etc/rc:
>
> 1. Skip any rc.d scripts with the "firstboot" keyword if /var/db/firstboot
> does not exist,
>
> 2. If /var/db/firstboot and /var/db/firstboot-reboot exist after running
> rc.d
> scripts, reboot.
>
> 3. Delete /var/db/firstboot (and firstboot-reboot) after the first boot.
>

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.

Thanks,
matthew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm-YqxeVsjVXszh-4gt-doXZQVL%2BXKpx_65az8TrE_V0ow>