RFC: support for "first boot" rc.d scripts
Matthew Fleming
mdf at FreeBSD.org
Tue Oct 15 20:09:37 UTC 2013
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
More information about the freebsd-current
mailing list