diff options
author | cperciva <cperciva@FreeBSD.org> | 2013-12-03 21:55:57 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2013-12-03 21:55:57 +0000 |
commit | d5c04c6f999989a71d0e162413b46634031de26f (patch) | |
tree | aeb3569a134660cd4880636f2a4bf248aab44542 /etc | |
parent | ed175e034f7d36907173e9d64910c6c5b106734b (diff) | |
download | FreeBSD-src-d5c04c6f999989a71d0e162413b46634031de26f.zip FreeBSD-src-d5c04c6f999989a71d0e162413b46634031de26f.tar.gz |
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.
Since performance considerations make it infeasible to automatically detect
if the cached /etc/rc.conf parameters should be invalidated, provide a
mechanism for explicitly requesting that /etc/rc.conf be reloaded: Catch
SIGALRM and reload /etc/rc.conf if it is received.
Discussed on: freebsd-rc
MFC after: 3 days
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" |