Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167991070
D13946.id38073.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D13946.id38073.diff
View Options
Index: etc/defaults/rc.conf
===================================================================
--- etc/defaults/rc.conf
+++ etc/defaults/rc.conf
@@ -17,6 +17,8 @@
#
# $FreeBSD$
+: ${__RC_CONF=/etc/rc.conf}
+
##############################################################
### Important initial Boot-time options ####################
##############################################################
@@ -701,6 +703,9 @@
source_rc_confs_defined=yes
source_rc_confs() {
local i sourced_files
+ if [ ! -z "${__RC_CONF}" ]; then
+ rc_conf_files=${__RC_CONF}
+ fi
for i in ${rc_conf_files}; do
case ${sourced_files} in
*:$i:*)
Index: etc/rc.subr
===================================================================
--- etc/rc.subr
+++ etc/rc.subr
@@ -33,6 +33,7 @@
#
: ${RC_PID:=$$}; export RC_PID
+: ${__RC_CONF=/etc/rc.conf}
#
# Operating System dependent/independent variables
@@ -1373,9 +1374,9 @@
debug "Sourcing /etc/defaults/rc.conf"
. /etc/defaults/rc.conf
source_rc_confs
- elif [ -r /etc/rc.conf ]; then
- debug "Sourcing /etc/rc.conf (/etc/defaults/rc.conf doesn't exist)."
- . /etc/rc.conf
+ elif [ -r ${__RC_CONF} ]; then
+ debug "Sourcing ${__RC_CONF} (/etc/defaults/rc.conf doesn't exist)."
+ . ${__RC_CONF}
fi
_rc_conf_loaded=true
fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 26, 7:23 PM (8 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37322247
Default Alt Text
D13946.id38073.diff (1 KB)
Attached To
Mode
D13946: (WIP) rc: Allow environment to override sourced rc.conf
Attached
Detach File
Event Timeline
Log In to Comment