From owner-svn-src-head@FreeBSD.ORG Sat Aug 23 10:51:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B11F17F3; Sat, 23 Aug 2014 10:51:38 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D66B37EF; Sat, 23 Aug 2014 10:51:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NApc27040485; Sat, 23 Aug 2014 10:51:38 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NApcM9040333; Sat, 23 Aug 2014 10:51:38 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231051.s7NApcM9040333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 10:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270392 - in head/etc: . mtree 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.18-1 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: Sat, 23 Aug 2014 10:51:38 -0000 Author: des Date: Sat Aug 23 10:51:37 2014 New Revision: 270392 URL: http://svnweb.freebsd.org/changeset/base/270392 Log: Add support for /etc/rc.conf.d/ subdirectories. This is particularly useful for services such as "network" (netif) where each interface can now have its own separate configuration file. Add /etc/rc.conf.d to the mtree file so it is always present. MFC after: 3 days Modified: head/etc/mtree/BSD.root.dist head/etc/rc.subr Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Sat Aug 23 10:49:02 2014 (r270391) +++ head/etc/mtree/BSD.root.dist Sat Aug 23 10:51:37 2014 (r270392) @@ -62,6 +62,8 @@ .. ppp .. + rc.conf.d + .. rc.d .. security Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Aug 23 10:49:02 2014 (r270391) +++ head/etc/rc.subr Sat Aug 23 10:51:37 2014 (r270392) @@ -1290,8 +1290,16 @@ load_rc_config() _rc_conf_loaded=true fi if [ -f /etc/rc.conf.d/"$_name" ]; then - debug "Sourcing /etc/rc.conf.d/${_name}" + debug "Sourcing /etc/rc.conf.d/$_name" . /etc/rc.conf.d/"$_name" + elif [ -d /etc/rc.conf.d/"$_name" ] ; then + local _rc + for _rc in /etc/rc.conf.d/"$_name"/* ; do + if [ -f "$_rc" ] ; then + debug "Sourcing $_rc" + . "$_rc" + fi + done fi # Set defaults if defined.