aboutsummaryrefslogtreecommitdiff
path: root/etc/defaults
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2013-10-19 21:37:06 +0000
committerColin Percival <cperciva@FreeBSD.org>2013-10-19 21:37:06 +0000
commitcabad2645377fe097fc53e7403d2c5b3ed95ff9a (patch)
tree4c9dd215229799a694dc77bb199866d711281f23 /etc/defaults
parentac640932f42de98208d715efc0a0773409ac1c83 (diff)
downloadsrc-cabad2645377fe097fc53e7403d2c5b3ed95ff9a.tar.gz
src-cabad2645377fe097fc53e7403d2c5b3ed95ff9a.zip
Add support for "first boot" rc.d scripts. [1]
These scripts, containing # KEYWORD: firstboot will only be run if a sentinel file (default: /firstboot, configurable via the rc.conf ${firstboot_sentinel} variable) exists; this sentinel file will be deleted at the end of the boot process. Scripts can request that the system reboot after the first boot by creating the file ${firstboot_sentinel}-reboot. This functionality is expected to be useful for embedded systems and virtual machine images, where it may be desirable to (a) download and install updates which became available between when the image was created and when it was "turned on"; (b) download and install packages which may be newer than those which were available when the image was created; (c) install packages which run binaries during their install process, bypassing the problem of cross-architecture installs; (d) resize filesystems to match the disk onto which a VM image was installed; (e) perform initialization tasks relevant to cloud systems (e.g., Amazon's Elastic Compute Cloud); and likely to perform many other one-time initialization functions. Document this new functionality in rc.conf(5) and rc(8). [2] Reviewed by: freebsd-current, freebsd-rc [1] Reviewed by: Warren Block [2] MFC after: 3 days
Notes
Notes: svn path=/head/; revision=256775
Diffstat (limited to 'etc/defaults')
-rw-r--r--etc/defaults/rc.conf3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index b04d7cfccf12..471fb3c2fd98 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -621,6 +621,9 @@ quotacheck_flags="-a" # Check all file system quotas (if enabled)
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).