svn commit: r295342 - head/etc/defaults

Devin Teske dteske at FreeBSD.org
Sat Feb 6 02:16:50 UTC 2016


Author: dteske
Date: Sat Feb  6 02:16:48 2016
New Revision: 295342
URL: https://svnweb.freebsd.org/changeset/base/295342

Log:
  Allow rc_conf_files to be redefined in rc.conf(5)
  
  With this change, it's possible to redefine rc_conf_files (e.g.,
  sysrc rc_conf_files+=/etc/rc.conf.other) and have the boot process
  pick up settings in extra files. The sysrc(8) tool can be used to
  query/enumerate/find/manage extra files configured in this manner.
  
  Relnotes:	yes

Modified:
  head/etc/defaults/rc.conf

Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf	Fri Feb  5 23:50:15 2016	(r295341)
+++ head/etc/defaults/rc.conf	Sat Feb  6 02:16:48 2016	(r295342)
@@ -716,5 +716,17 @@ if [ -z "${source_rc_confs_defined}" ]; 
 				;;
 			esac
 		done
+		for i in ${rc_conf_files}; do
+			case ${sourced_files} in
+			*:$i:*)
+				;;
+			*)
+				sourced_files="${sourced_files}:$i:"
+				if [ -r $i ]; then
+					. $i
+				fi
+				;;
+			esac
+		done
 	}
 fi


More information about the svn-src-head mailing list