aboutsummaryrefslogtreecommitdiff
path: root/net.Linux/iproute2.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net.Linux/iproute2.sh')
-rw-r--r--net.Linux/iproute2.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/net.Linux/iproute2.sh b/net.Linux/iproute2.sh
index d11cbccb..3d4224f6 100644
--- a/net.Linux/iproute2.sh
+++ b/net.Linux/iproute2.sh
@@ -211,17 +211,24 @@ iproute2_pre_start() {
return 0
}
+_iproute2_ipv6_tentative() {
+ LC_ALL=C ip addr show dev "${IFACE}" | \
+ grep -q "^[[:space:]]*inet6 .* tentative"
+}
+
iproute2_post_start() {
# Kernel may not have IP built in
if [ -e /proc/net/route ]; then
ip route flush table cache dev "${IFACE}"
fi
- vebegin "Waiting for IPv6 addresses"
- while true; do
- LC_ALL=C ip addr show dev "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative" || break
- done
- veend 0
+ if _iproute2_ipv6_tentative; then
+ ebegin "Waiting for IPv6 addresses"
+ while true; do
+ _iproute2_ipv6_tentative || break
+ done
+ eend 0
+ fi
}
iproute2_post_stop() {