From 0276c4f5164f053346dd585639161995ac0e6e75 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 22 Mar 2010 20:02:12 +0000 Subject: [PATCH] Release openrc-0.6.1 --- Makefile.inc | 2 +- init.d/network.in | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index 0b724857..7a1ea1c6 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,3 +1,3 @@ NAME= openrc -VERSION= 0.6.0 +VERSION= 0.6.1 PKG= ${NAME}-${VERSION} diff --git a/init.d/network.in b/init.d/network.in index 655fc173..7c406c58 100644 --- a/init.d/network.in +++ b/init.d/network.in @@ -57,6 +57,40 @@ sys_interfaces() esac } +tentative() +{ + local inet= address= rest= + + 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 ] + *) + local inet= address= rest= + LC_ALL=C ifconfig -a | while read inet address rest; do + case "${inet}" in + inet6) + case "${rest}" in + *" "tentative*) return 2;; + esac + ;; + esac + done + [ $? = 2 ] + ;; + esac +} + + auto_interfaces() { local ifs= c= f= @@ -251,6 +285,14 @@ start() eoutdent eend $cr + # Wait for any inet6 tentative addresses + r=5 + while [ $r -gt 0 ]; do + tentative || break + sleep 1 + r=$(($r - 1)) + done + if [ -n "$defaultroute" ]; then ebegin "Setting default route $defaultroute" route add default $defaultroute