summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2000-04-27 08:43:49 +0000
committersheldonh <sheldonh@FreeBSD.org>2000-04-27 08:43:49 +0000
commite9b12780388b49c05ad5f15144bbbfc94168dc89 (patch)
tree7abb09b02c45f55b7bfe0939c7836dd33fea232f /etc/rc
parent4ff5ca59a75f537882934263881113c1ce6f4ab6 (diff)
downloadFreeBSD-src-e9b12780388b49c05ad5f15144bbbfc94168dc89.zip
FreeBSD-src-e9b12780388b49c05ad5f15144bbbfc94168dc89.tar.gz
Add to defaults/rc.conf a new function source_rc_confs which rc
scripts may use to source safely overrides in ${rc_conf_files} files. This protects users who insist on the bad practice of copying /etc/defaults/rc.conf to /etc/rc.conf from a recursive loop that exhausts available file descriptors. Several people have expressed interest in breaking this function out into its own shell script. Anyone who wants to embark on such an undertaking would do well to study the attributed PR. PR: 17595 Reported by: adrian Submitted by: Doug Barton <Doug@gorean.org>
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index b9dbfd8..4e80185 100644
--- a/etc/rc
+++ b/etc/rc
@@ -38,6 +38,7 @@ fi
#
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
+ source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
@@ -500,6 +501,9 @@ fi
# ---- rc.local ----
# if [ -r /etc/defaults/rc.conf ]; then
# . /etc/defaults/rc.conf
+# source_rc_confs
+# elif [ -r /etc/rc.conf ]; then
+# . /etc/rc.conf
# fi
#
# ... additional startup conditionals ...
OpenPOWER on IntegriCloud