summaryrefslogtreecommitdiff
path: root/net.Linux
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-12-04 09:55:59 +0000
committerRoy Marples <roy@marples.name>2007-12-04 09:55:59 +0000
commit8cfb8f13338cf2ea7846a6bad15138683648cc4a (patch)
treefdb82d023fcc254320c6ac767d20864ae8c74be8 /net.Linux
parent6ce3bf096bb3e397371e38ee2625092d2470a5e8 (diff)
downloadopenrc-8cfb8f13338cf2ea7846a6bad15138683648cc4a.tar.gz
openrc-8cfb8f13338cf2ea7846a6bad15138683648cc4a.tar.bz2
openrc-8cfb8f13338cf2ea7846a6bad15138683648cc4a.tar.xz
Always show the 'Waiting for IPv6 addresses' message if we need to wait, and fixup inet6 addresses on FreeBSD-7
Diffstat (limited to 'net.Linux')
-rw-r--r--net.Linux/iproute2.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/net.Linux/iproute2.sh b/net.Linux/iproute2.sh
index d11cbcc..3d4224f 100644
--- a/net.Linux/iproute2.sh
+++ b/net.Linux/iproute2.sh
@@ -211,17 +211,24 @@ iproute2_pre_start() {
return 0
}
+_iproute2_ipv6_tentative() {
+ LC_ALL=C ip addr show dev "${IFACE}" | \
+ grep -q "^[[:space:]]*inet6 .* tentative"
+}
+
iproute2_post_start() {
# Kernel may not have IP built in
if [ -e /proc/net/route ]; then
ip route flush table cache dev "${IFACE}"
fi
- vebegin "Waiting for IPv6 addresses"
- while true; do
- LC_ALL=C ip addr show dev "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative" || break
- done
- veend 0
+ if _iproute2_ipv6_tentative; then
+ ebegin "Waiting for IPv6 addresses"
+ while true; do
+ _iproute2_ipv6_tentative || break
+ done
+ eend 0
+ fi
}
iproute2_post_stop() {