Always show the 'Waiting for IPv6 addresses' message if we need to wait, and fixup inet6 addresses on FreeBSD-7
This commit is contained in:
parent
6ce3bf096b
commit
8cfb8f1333
@ -126,7 +126,7 @@ _add_address() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
ifconfig "${IFACE}" ${inet6} alias "$@"
|
ifconfig "${IFACE}" ${inet6} "$@" alias
|
||||||
}
|
}
|
||||||
|
|
||||||
_add_route() {
|
_add_route() {
|
||||||
@ -160,7 +160,7 @@ _delete_addresses() {
|
|||||||
[ "$1" = "lo" -o "$1" = "lo0" ] && continue
|
[ "$1" = "lo" -o "$1" = "lo0" ] && continue
|
||||||
fi
|
fi
|
||||||
einfo "${addr}"
|
einfo "${addr}"
|
||||||
ifconfig "$1" delete "${addr}"
|
ifconfig "$1" "${addr}" -alias
|
||||||
eend $?
|
eend $?
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ _delete_addresses() {
|
|||||||
::1) continue;;
|
::1) continue;;
|
||||||
esac
|
esac
|
||||||
einfo "${addr}"
|
einfo "${addr}"
|
||||||
ifconfig "${IFACE}" inet6 delete "${addr}"
|
ifconfig "${IFACE}" inet6 "${addr}" -alias
|
||||||
eend $?
|
eend $?
|
||||||
done
|
done
|
||||||
eoutdent
|
eoutdent
|
||||||
@ -222,12 +222,18 @@ ifconfig_pre_start() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ifconfig_ipv6_tentative() {
|
||||||
|
LC_ALL=C ifconfig "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative"
|
||||||
|
}
|
||||||
|
|
||||||
ifconfig_post_start() {
|
ifconfig_post_start() {
|
||||||
vebegin "Waiting for IPv6 addresses"
|
if _ifconfig_ipv6_tentative; then
|
||||||
while true; do
|
ebegin "Waiting for IPv6 addresses"
|
||||||
LC_ALL=C ifconfig "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative" || break
|
while true; do
|
||||||
done
|
_ifconfig_ipv6_tentative || break
|
||||||
veend 0
|
done
|
||||||
|
eend 0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set ts=4 :
|
# vim: set ts=4 :
|
||||||
|
@ -211,17 +211,24 @@ iproute2_pre_start() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_iproute2_ipv6_tentative() {
|
||||||
|
LC_ALL=C ip addr show dev "${IFACE}" | \
|
||||||
|
grep -q "^[[:space:]]*inet6 .* tentative"
|
||||||
|
}
|
||||||
|
|
||||||
iproute2_post_start() {
|
iproute2_post_start() {
|
||||||
# Kernel may not have IP built in
|
# Kernel may not have IP built in
|
||||||
if [ -e /proc/net/route ]; then
|
if [ -e /proc/net/route ]; then
|
||||||
ip route flush table cache dev "${IFACE}"
|
ip route flush table cache dev "${IFACE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
vebegin "Waiting for IPv6 addresses"
|
if _iproute2_ipv6_tentative; then
|
||||||
while true; do
|
ebegin "Waiting for IPv6 addresses"
|
||||||
LC_ALL=C ip addr show dev "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative" || break
|
while true; do
|
||||||
done
|
_iproute2_ipv6_tentative || break
|
||||||
veend 0
|
done
|
||||||
|
eend 0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
iproute2_post_stop() {
|
iproute2_post_stop() {
|
||||||
|
Loading…
Reference in New Issue
Block a user