svn commit: r258894 - head/etc
Colin Percival
cperciva at FreeBSD.org
Tue Dec 3 21:55:58 UTC 2013
Author: cperciva
Date: Tue Dec 3 21:55:57 2013
New Revision: 258894
URL: http://svnweb.freebsd.org/changeset/base/258894
Log:
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
Modified:
head/etc/rc
Modified: head/etc/rc
==============================================================================
--- head/etc/rc Tue Dec 3 21:35:25 2013 (r258893)
+++ head/etc/rc Tue Dec 3 21:55:57 2013 (r258894)
@@ -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"
More information about the svn-src-head
mailing list