| Summary: | /usr/sbin/jail fails with "jail: unknown parameter: ip6" | ||
|---|---|---|---|
| Product: | Base System | Reporter: | bartsch |
| Component: | bin | Assignee: | Eitan Adler <eadler> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
bartsch
2012-06-13 11:30:06 UTC
This problem only affects people using jails built without IPV6. The patch
below fixes the problem, and anticipates builds without IPv4 :)
My apologies, in advance for the line breaks that my mailer will insert.
The following patch is applied against 9-Stable built on 17th Nov 2012.
For $FreeBSD: src/etc/rc.d/jail,v 1.47.2.6 2012/10/26 18:06:49 obrien Exp $
--- jail.orig 2012-11-06 13:37:55.000000000 +1100
+++ jail 2012-11-23 12:32:42.000000000 +1100
@@ -655,8 +655,20 @@
i=$((i + 1))
done
+ if [ ! -z ${_addrl} ]; then
+ eval IPV4="ip4.addr=\"${_addrl}\""
+ else
+ IPV4=""
+ fi
+
+ if [ ! -z ${_addr6l} ]; then
+ eval IPV6="ip6.addr=\"${_addr6l}\""
+ else
+ IPV6=""
+ fi
+
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 \
+ "$IPV4" "$IPV6" ${_parameters}
command=${_exec_start} > ${_tmp_jail} 2>&1 \
</dev/null
if [ "$?" -eq 0 ] ; then
Regards, Dewayne.
Responsible Changed From-To: freebsd-bugs->eadler I committed this State Changed From-To: open->closed committed in r243080 |