Date: Sat, 23 Aug 2014 10:51:38 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270392 - in head/etc: . mtree Message-ID: <201408231051.s7NApcM9040333@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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/<service> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408231051.s7NApcM9040333>