summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-09-04 13:23:35 +0100
committerRoy Marples <roy@marples.name>2009-09-04 13:23:40 +0100
commit807e5d725086832b899ba03a2203824ecf296d8b (patch)
tree1ce90d60ab702e883d76af7d17f288ca22720bb2 /net
parent70126303021ddc3910b06801e83222bf6a4f9104 (diff)
downloadopenrc-807e5d725086832b899ba03a2203824ecf296d8b.tar.gz
openrc-807e5d725086832b899ba03a2203824ecf296d8b.tar.bz2
openrc-807e5d725086832b899ba03a2203824ecf296d8b.tar.xz
Timeout for ipv6 addresses being tentative.
Diffstat (limited to 'net')
-rw-r--r--net/iproute2.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index b1fe861..d983c9b 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -225,6 +225,8 @@ _iproute2_ipv6_tentative()
iproute2_post_start()
{
+ local n=5
+
# Kernel may not have IP built in
if [ -e /proc/net/route ]; then
ip route flush table cache dev "${IFACE}"
@@ -232,11 +234,16 @@ iproute2_post_start()
if _iproute2_ipv6_tentative; then
ebegin "Waiting for IPv6 addresses"
- while true; do
+ while [ $n -ge 0 ]; do
_iproute2_ipv6_tentative || break
+ sleep 1
+ n=$(($n - 1))
done
- eend 0
+ [ $n -ge 0 ]
+ eend $?
fi
+
+ return 0
}
iproute2_post_stop()