svn commit: r260432 - stable/9/etc

Colin Percival cperciva at FreeBSD.org
Wed Jan 8 02:30:25 UTC 2014


Author: cperciva
Date: Wed Jan  8 02:30:24 2014
New Revision: 260432
URL: http://svnweb.freebsd.org/changeset/base/260432

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.

Modified:
  stable/9/etc/rc
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/rc
==============================================================================
--- stable/9/etc/rc	Wed Jan  8 02:19:39 2014	(r260431)
+++ stable/9/etc/rc	Wed Jan  8 02:30:24 2014	(r260432)
@@ -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-all mailing list