Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147254715
D38826.1782694455.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D38826.1782694455.diff
View Options
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -735,6 +735,7 @@
##############################################################
jail_enable="NO" # Set to NO to disable starting of any jails
jail_conf="/etc/jail.conf" # Configuration file for jail(8)
+jail_conf_dir="/etc/jail.conf.d" # Configuration directory for jail(8)
jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration
jail_parallel_start="NO" # Start jails in the background
jail_list="" # Space separated list of names of jails
diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail
--- a/libexec/rc/rc.d/jail
+++ b/libexec/rc/rc.d/jail
@@ -455,12 +455,14 @@
_ALL)
command=$jail_program
rc_flags=$jail_flags
- command_args="-f $jail_conf -c"
+ command_args='-f - -c'
if ! checkyesno jail_parallel_start; then
command_args="$command_args -p1"
fi
_tmp=`mktemp -t jail` || exit 3
- if $command $rc_flags $command_args >> $_tmp 2>&1; then
+ if cat $jail_conf $jail_conf_dir/*.conf \
+ /etc/jail.*.conf 2>/dev/null | \
+ $command $rc_flags $command_args >> $_tmp 2>&1; then
$jail_jls jid name | while read _id _name; do
startmsg -n " $_name"
echo $_id > /var/run/jail_${_name}.id
@@ -485,10 +487,12 @@
eval rc_flags=\${jail_${_jv}_flags:-$jail_flags}
eval command=\${jail_${_jv}_program:-$jail_program}
- command_args="-i -f $_conf -c $_j"
+ command_args="-i -f - -c $_j"
(
_tmp=`mktemp -t jail_${_j}` || exit 3
- if $command $rc_flags $command_args \
+ if cat $jail_conf $_conf $jail_conf_dir/*.conf \
+ /etc/jail.*.conf 2>/dev/null | \
+ $command $rc_flags $command_args \
>> $_tmp 2>&1 </dev/null; then
startmsg -n " ${_hostname:-${_j}}"
_jid=$($jail_jls -j $_j jid)
@@ -513,9 +517,11 @@
eval rc_flags=\${jail_${_jv}_flags:-$jail_flags}
eval command=\${jail_${_jv}_program:-$jail_program}
- command_args="-i -f $_conf -c $_j"
+ command_args="-i -f - -c"
_tmp=`mktemp -t jail` || exit 3
- if $command $rc_flags $command_args \
+ if (cat $_conf $jail_conf $jail_conf_dir/*.conf \
+ /etc/jail.*.conf 2>/dev/null | \
+ $command $rc_flags $command_args $_j) \
>> $_tmp 2>&1 </dev/null; then
startmsg -n " ${_hostname:-${_j}}"
_jid=$($jail_jls -j $_j jid)
@@ -543,7 +549,7 @@
_ALL)
command=$jail_program
rc_flags=$jail_flags
- command_args="-f $jail_conf -r"
+ command_args='-f - -r'
if checkyesno jail_reverse_stop; then
$jail_jls name | tail -r
else
@@ -551,6 +557,8 @@
fi | while read _j; do
echo -n " $_j"
_tmp=`mktemp -t jail` || exit 3
+ cat $jail_conf $jail_conf_dir/*.conf \
+ /etc/jail.*.conf 2>/dev/null | \
$command $rc_flags $command_args $_j >> $_tmp 2>&1
if $jail_jls -j $_j > /dev/null 2>&1; then
cat $_tmp
@@ -574,7 +582,9 @@
eval command=\${jail_${_jv}_program:-$jail_program}
echo -n " ${_hostname:-${_j}}"
_tmp=`mktemp -t jail` || exit 3
- $command -q -f $_conf -r $_j >> $_tmp 2>&1
+ cat $_conf $jail_conf $jail_conf_dir/*.conf \
+ /etc/jail.*.conf 2>/dev/null | \
+ $command -q -f - -r $_j >> $_tmp 2>&1
if $jail_jls -j $_j > /dev/null 2>&1; then
cat $_tmp
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 29, 12:54 AM (1 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28975284
Default Alt Text
D38826.1782694455.diff (3 KB)
Attached To
Mode
D38826: Fix multiple rc.d/jail and jail.conf.d issues
Attached
Detach File
Event Timeline
Log In to Comment