summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2016-02-06 02:16:48 +0000
committerdteske <dteske@FreeBSD.org>2016-02-06 02:16:48 +0000
commit0e082dce884fa04860090796745506c7bbcfadca (patch)
treefa5335febfcc9b921cfa73fbec93d8c95dc701ea /etc
parentebde2e6348e8c51b90136123557364880f072efb (diff)
downloadFreeBSD-src-0e082dce884fa04860090796745506c7bbcfadca.zip
FreeBSD-src-0e082dce884fa04860090796745506c7bbcfadca.tar.gz
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
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index a674acb..f8ca47f 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -716,5 +716,17 @@ if [ -z "${source_rc_confs_defined}" ]; then
;;
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
OpenPOWER on IntegriCloud