aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc2
-rw-r--r--init.d/network.in42
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