diff options
author | cperciva <cperciva@FreeBSD.org> | 2013-12-06 20:48:53 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2013-12-06 20:48:53 +0000 |
commit | 3cc5015bda0c021b585f4d8f27107dbd446bc69d (patch) | |
tree | 35eae2e716f5a0700179d305f843c7614b6d2924 /etc | |
parent | dd1133fe214392cdf359b2083c1c9c3d339c724b (diff) | |
download | FreeBSD-src-3cc5015bda0c021b585f4d8f27107dbd446bc69d.zip FreeBSD-src-3cc5015bda0c021b585f4d8f27107dbd446bc69d.tar.gz |
MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM.
The rc system aggressively caches the contents of /etc/rc.conf in order to
improve boot performance; this produces arguably astonishing (non-)results
if /etc/rc.conf is modified during the boot process. This commit provides
a mechanism for explicitly requesting that rc.conf be reloaded.
Approved by: re (rodrigc)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -71,6 +71,11 @@ fi . /etc/rc.subr load_rc_config 'XXX' +# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d +# scripts to perform "boot-time configuration" including enabling and +# disabling rc.d scripts which appear later in the boot order. +trap "_rc_conf_loaded=false; load_rc_config 'XXX'" ALRM + skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" |