Date: Fri, 6 Dec 2013 20:48:53 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259040 - stable/10/etc Message-ID: <201312062048.rB6Kmrdo021602@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Fri Dec 6 20:48:53 2013 New Revision: 259040 URL: http://svnweb.freebsd.org/changeset/base/259040 Log: 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) Modified: stable/10/etc/rc Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/etc/rc ============================================================================== --- stable/10/etc/rc Fri Dec 6 18:41:16 2013 (r259039) +++ stable/10/etc/rc Fri Dec 6 20:48:53 2013 (r259040) @@ -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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312062048.rB6Kmrdo021602>