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

From: Matthew Fleming <mdf_at_FreeBSD.org>
Date: Tue, 15 Oct 2013 13:09:35 -0700
On Sun, Oct 13, 2013 at 3:58 PM, Colin Percival <cperciva_at_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
Received on Tue Oct 15 2013 - 18:09:37 UTC

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