From owner-svn-src-head@FreeBSD.ORG Tue Dec 3 21:55:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E8BF84C; Tue, 3 Dec 2013 21:55:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A265159B; Tue, 3 Dec 2013 21:55:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3LtwvY008302; Tue, 3 Dec 2013 21:55:58 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3LtwfQ008301; Tue, 3 Dec 2013 21:55:58 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201312032155.rB3LtwfQ008301@svn.freebsd.org> From: Colin Percival Date: Tue, 3 Dec 2013 21:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258894 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 21:55:58 -0000 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"