From 67b538fd262c72198e1b293f6bea314051034656 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 24 Mar 2010 20:25:42 +0000 Subject: Fix tentative ip addresses --- init.d/network.in | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/init.d/network.in b/init.d/network.in index 7c406c5..f03d08f 100644 --- a/init.d/network.in +++ b/init.d/network.in @@ -64,16 +64,8 @@ tentative() case "$RC_UNAME" in Linux) [ -x /sbin/ip ] || return 1 - LC_ALL=C ip addr show | while read inet address rest; do - case "${inet}" in - inet6) - case "${rest}" in - *" "tentative*) return 2;; - esac - ;; - esac - done - [ $? = 2 ] + [ -n "$(ip -f inet6 addr show tentative)" ] + ;; *) local inet= address= rest= LC_ALL=C ifconfig -a | while read inet address rest; do @@ -289,9 +281,14 @@ start() r=5 while [ $r -gt 0 ]; do tentative || break + [ $r = 5 ] && vebegin "Waiting for tentative addresses" sleep 1 r=$(($r - 1)) done + if [ $r != 5 ]; then + [ $r != 0 ] + veend $? + fi if [ -n "$defaultroute" ]; then ebegin "Setting default route $defaultroute" -- cgit v1.2.3