Start jails non-parallel if jail_parallel_start is NO. This was true
for an explicitly specified jail list; now it's also true for all jails. PR: 209112 MFC after: 3 days
This commit is contained in:
parent
4c86c0fa98
commit
106efceff3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302857
@ -451,6 +451,9 @@ jail_start()
|
|||||||
command=$jail_program
|
command=$jail_program
|
||||||
rc_flags=$jail_flags
|
rc_flags=$jail_flags
|
||||||
command_args="-f $jail_conf -c"
|
command_args="-f $jail_conf -c"
|
||||||
|
if ! checkyesno jail_parallel_start; then
|
||||||
|
command_args="$command_args -p1"
|
||||||
|
fi
|
||||||
_tmp=`mktemp -t jail` || exit 3
|
_tmp=`mktemp -t jail` || exit 3
|
||||||
if $command $rc_flags $command_args >> $_tmp 2>&1; then
|
if $command $rc_flags $command_args >> $_tmp 2>&1; then
|
||||||
$jail_jls jid name | while read _id _name; do
|
$jail_jls jid name | while read _id _name; do
|
||||||
@ -458,7 +461,7 @@ jail_start()
|
|||||||
echo $_id > /var/run/jail_${_name}.id
|
echo $_id > /var/run/jail_${_name}.id
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
tail -1 $_tmp
|
cat $_tmp
|
||||||
fi
|
fi
|
||||||
rm -f $_tmp
|
rm -f $_tmp
|
||||||
echo '.'
|
echo '.'
|
||||||
@ -545,7 +548,7 @@ jail_stop()
|
|||||||
_tmp=`mktemp -t jail` || exit 3
|
_tmp=`mktemp -t jail` || exit 3
|
||||||
$command $rc_flags $command_args $_j >> $_tmp 2>&1
|
$command $rc_flags $command_args $_j >> $_tmp 2>&1
|
||||||
if $jail_jls -j $_j > /dev/null 2>&1; then
|
if $jail_jls -j $_j > /dev/null 2>&1; then
|
||||||
tail -1 $_tmp
|
cat $_tmp
|
||||||
else
|
else
|
||||||
rm -f /var/run/jail_${_j}.id
|
rm -f /var/run/jail_${_j}.id
|
||||||
fi
|
fi
|
||||||
@ -568,7 +571,7 @@ jail_stop()
|
|||||||
_tmp=`mktemp -t jail` || exit 3
|
_tmp=`mktemp -t jail` || exit 3
|
||||||
$command -q -f $_conf -r $_j >> $_tmp 2>&1
|
$command -q -f $_conf -r $_j >> $_tmp 2>&1
|
||||||
if $jail_jls -j $_j > /dev/null 2>&1; then
|
if $jail_jls -j $_j > /dev/null 2>&1; then
|
||||||
tail -1 $_tmp
|
cat $_tmp
|
||||||
else
|
else
|
||||||
rm -f /var/run/jail_${_j}.id
|
rm -f /var/run/jail_${_j}.id
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user