diff options
author | Roy Marples <roy@marples.name> | 2010-03-22 20:02:12 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2010-03-22 20:02:12 +0000 |
commit | 0276c4f5164f053346dd585639161995ac0e6e75 (patch) | |
tree | 99c86d91e5859a48ffa15a6ccb6ed07b2f80ddc8 | |
parent | 7271449a0cab6aab8df23736e862e838d03df86e (diff) |
Release openrc-0.6.1
-rw-r--r-- | Makefile.inc | 2 | ||||
-rw-r--r-- | init.d/network.in | 42 |
2 files changed, 43 insertions, 1 deletions
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 |