aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2010-03-24 20:25:42 +0000
committerRoy Marples <roy@marples.name>2010-03-24 20:25:42 +0000
commit67b538fd262c72198e1b293f6bea314051034656 (patch)
tree510e0c777d2ebc26415088207605c462df4bc5c2
parent0276c4f5164f053346dd585639161995ac0e6e75 (diff)
Fix tentative ip addresses
-rw-r--r--init.d/network.in17
1 files changed, 7 insertions, 10 deletions
diff --git a/init.d/network.in b/init.d/network.in
index 7c406c58..f03d08f0 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"