From f29d4794f9556b3f00d0a54402613a4e54de5d86 Mon Sep 17 00:00:00 2001 From: cperciva Date: Wed, 8 Jan 2014 02:30:24 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.freebsd.org/base/stable/9@260432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- etc/rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/rc b/etc/rc index fd5ff8523..21efc18c8 100644 --- a/etc/rc +++ b/etc/rc @@ -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" -- 2.45.0