FreeBSD Bugzilla – Attachment 161148 Details for
Bug 203172
[patch] [jail] race condition in /etc/rc.d/jail when jail_parallel_start is YES
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Patch for /etc/rc.d/jail
patch.txt (text/plain), 1.37 KB, created by
dmitry2004
on 2015-09-17 13:11:37 UTC
(
hide
)
Description:
Patch for /etc/rc.d/jail
Filename:
MIME Type:
Creator:
dmitry2004
Created:
2015-09-17 13:11:37 UTC
Size:
1.37 KB
patch
obsolete
>--- /etc/rc.d/jail.orig >+++ /etc/rc.d/jail >@@ -419,7 +419,7 @@ > > jail_start() > { >- local _j _jid _jl >+ local _j _jid _tmp > > if [ $# = 0 ]; then > return >@@ -450,29 +450,31 @@ > # Start jails in parallel and then check jail id when > # jail_parallel_start is YES. > # >- _jl= > for _j in $@; do > _j=$(echo $_j | tr /. _) > parse_options $_j || continue > >- _jl="$_jl $_j" > eval rc_flags=\${jail_${_j}_flags:-$jail_flags} > eval command=\${jail_${_j}_program:-$jail_program} > command_args="-i -f $_conf -c $_j" >- $command $rc_flags $command_args \ >- >/dev/null 2>&1 </dev/null & >- done >- sleep 3 >- for _j in $_jl; do >- echo -n " ${_hostname:-${_j}}" >- if _jid=$($jail_jls -j $_j jid); then >- echo "$_jid" > /var/run/jail_${_j}.id >- else >- rm -f /var/run/jail_${_j}.id >- echo " cannot start jail " \ >- "\"${_hostname:-${_j}}\": " >- fi >+ ( >+ _tmp=`mktemp -t jail_${_j}` || exit 3 >+ if $command $rc_flags $command_args \ >+ > ${_tmp} 2>&1 </dev/null; >+ then >+ echo -n " ${_hostname:-${_j}}" >+ _jid=$($jail_jls -j $_j jid) >+ echo $_jid > /var/run/jail_${_j}.id >+ else >+ rm -f /var/run/jail_${_j}.id >+ echo " cannot start jail " \ >+ "\"${_hostname:-${_j}}\": " >+ cat ${_tmp} >+ fi >+ rm -f ${_tmp} >+ ) & > done >+ wait > else > # > # Start jails one-by-one when jail_parallel_start is NO.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 203172
:
161148
|
165213
|
172369