From 3cc5015bda0c021b585f4d8f27107dbd446bc69d Mon Sep 17 00:00:00 2001 From: cperciva Date: Fri, 6 Dec 2013 20:48:53 +0000 Subject: 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) --- etc/rc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc/rc') diff --git a/etc/rc b/etc/rc index fd5ff85..21efc18 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" -- cgit v1.1