summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/jail
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/jail')
-rwxr-xr-xetc/rc.d/jail12
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/rc.d/jail b/etc/rc.d/jail
index 0718fa8..f19983f 100755
--- a/etc/rc.d/jail
+++ b/etc/rc.d/jail
@@ -509,7 +509,7 @@ jail_handle_ips_option()
esac
case "${_type}" in
inet) ;;
- inet6) ;;
+ inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;;
*) warn "Could not determine address family. Not going" \
"to ${_action} address '${_addr}' for ${_jail}."
continue
@@ -546,6 +546,7 @@ jail_ips()
esac
# Handle addresses.
+ ipv6_address_count=0
jail_handle_ips_option ${_action} "${_ip}"
# Handle jail_xxx_ip_multi<N>
alias=0
@@ -558,6 +559,12 @@ jail_ips()
;;
esac
done
+ case ${ipv6_address_count} in
+ 0) ;;
+ *) # Sleep 1 second to let DAD complete before starting services.
+ sleep 1
+ ;;
+ esac
}
jail_prestart()
@@ -656,7 +663,8 @@ jail_start()
done
eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \
- ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \
+ ${_addrl:+ip4.addr=\"${_addrl}\"} ${_addr6l:+ip6.addr=\"${_addr6l}\"} \
+ ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \
</dev/null
if [ "$?" -eq 0 ] ; then
OpenPOWER on IntegriCloud