From 6ce3bf096bb3e397371e38ee2625092d2470a5e8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 3 Dec 2007 18:02:57 +0000 Subject: [PATCH] Wait for IPv6 addresses to complete, Gentoo bug #169442. --- net.BSD/ifconfig.sh | 8 ++++++++ net.Linux/iproute2.sh | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh index 6967bf45..404d1dee 100644 --- a/net.BSD/ifconfig.sh +++ b/net.BSD/ifconfig.sh @@ -222,4 +222,12 @@ ifconfig_pre_start() { return 0 } +ifconfig_post_start() { + vebegin "Waiting for IPv6 addresses" + while true; do + LC_ALL=C ifconfig "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative" || break + done + veend 0 +} + # vim: set ts=4 : diff --git a/net.Linux/iproute2.sh b/net.Linux/iproute2.sh index d3f3e76a..d11cbccb 100644 --- a/net.Linux/iproute2.sh +++ b/net.Linux/iproute2.sh @@ -216,6 +216,12 @@ iproute2_post_start() { 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 } iproute2_post_stop() {