mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-26 07:55:01 +00:00
Implement the idea of parallel-only-at-start-time in a cleaner, more
rc.d'ish way. Not objected to by: netchild
This commit is contained in:
parent
aa6c3b4c60
commit
5d3cc6a4f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204818
@ -18,6 +18,8 @@
|
||||
|
||||
name="jail"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
start_precmd="jail_prestart"
|
||||
start_cmd="jail_start"
|
||||
stop_cmd="jail_stop"
|
||||
|
||||
@ -545,6 +547,13 @@ jail_ips()
|
||||
done
|
||||
}
|
||||
|
||||
jail_prestart()
|
||||
{
|
||||
if checkyesno jail_parallel_start; then
|
||||
command_args='&'
|
||||
fi
|
||||
}
|
||||
|
||||
jail_start()
|
||||
{
|
||||
echo -n 'Configuring jails:'
|
||||
@ -730,18 +739,4 @@ if [ -n "$*" ]; then
|
||||
jail_list="$*"
|
||||
fi
|
||||
|
||||
# Only allow the parallel start of jails, other commands are not
|
||||
# safe to execute in parallel.
|
||||
case "${cmd}" in
|
||||
*start)
|
||||
;;
|
||||
*)
|
||||
jail_parallel_start=NO
|
||||
esac
|
||||
|
||||
if checkyesno jail_parallel_start; then
|
||||
run_rc_command "${cmd}" &
|
||||
else
|
||||
run_rc_command "${cmd}"
|
||||
fi
|
||||
|
||||
run_rc_command "${cmd}"
|
||||
|
Loading…
Reference in New Issue
Block a user