Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf (revision 256432) +++ etc/defaults/rc.conf (working copy) @@ -619,6 +619,9 @@ accounting_enable="NO" # Turn on process accounting (or NO). ibcs2_enable="NO" # Ibcs2 (SCO) emulation loaded at startup (or NO). ibcs2_loaders="coff" # List of additional Ibcs2 loaders (or NO). +firstboot_sentinel="/firstboot" # Scripts with "firstboot" keyword are run if + # this file exists. Should be on a R/W filesystem so + # the file can be deleted after the boot completes. # Emulation/compatibility services provided by /etc/rc.d/abi sysvipc_enable="NO" # Load System V IPC primitives at startup (or NO). Index: etc/rc =================================================================== --- etc/rc (revision 256432) +++ etc/rc (working copy) @@ -81,6 +81,9 @@ skip="$skip -s nojailvnet" fi fi +if ! [ -e ${firstboot_sentinel} ]; then + skip="$skip -s firstboot" +fi # Do a first pass to get everything up to $early_late_divider so that # we can do a second pass that includes $local_startup directories @@ -116,6 +119,13 @@ run_rc_script ${_rc_elem} ${_boot} done +if [ -e ${firstboot_sentinel} ]; then + rm ${firstboot_sentinel} + if [ -e ${firstboot_sentinel}-reboot ]; then + rm ${firstboot_sentinel}-reboot + kill -INT 1 + fi +fi echo '' date exit 0