diff options
author | Roy Marples <roy@marples.name> | 2007-12-04 09:55:59 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-12-04 09:55:59 +0000 |
commit | 8cfb8f13338cf2ea7846a6bad15138683648cc4a (patch) | |
tree | fdb82d023fcc254320c6ac767d20864ae8c74be8 /net.BSD/ifconfig.sh | |
parent | 6ce3bf096bb3e397371e38ee2625092d2470a5e8 (diff) |
Always show the 'Waiting for IPv6 addresses' message if we need to wait, and fixup inet6 addresses on FreeBSD-7
Diffstat (limited to 'net.BSD/ifconfig.sh')
-rw-r--r-- | net.BSD/ifconfig.sh | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh index 404d1dee..4f16b586 100644 --- a/net.BSD/ifconfig.sh +++ b/net.BSD/ifconfig.sh @@ -126,7 +126,7 @@ _add_address() { ;; esac - ifconfig "${IFACE}" ${inet6} alias "$@" + ifconfig "${IFACE}" ${inet6} "$@" alias } _add_route() { @@ -160,7 +160,7 @@ _delete_addresses() { [ "$1" = "lo" -o "$1" = "lo0" ] && continue fi einfo "${addr}" - ifconfig "$1" delete "${addr}" + ifconfig "$1" "${addr}" -alias eend $? done @@ -172,7 +172,7 @@ _delete_addresses() { ::1) continue;; esac einfo "${addr}" - ifconfig "${IFACE}" inet6 delete "${addr}" + ifconfig "${IFACE}" inet6 "${addr}" -alias eend $? done eoutdent @@ -222,12 +222,18 @@ ifconfig_pre_start() { return 0 } +_ifconfig_ipv6_tentative() { + LC_ALL=C ifconfig "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative" +} + ifconfig_post_start() { - vebegin "Waiting for IPv6 addresses" - while true; do - LC_ALL=C ifconfig "${IFACE}" | grep -q "^[[:space:]]*inet6 .* tentative" || break - done - veend 0 + if _ifconfig_ipv6_tentative; then + ebegin "Waiting for IPv6 addresses" + while true; do + _ifconfig_ipv6_tentative || break + done + eend 0 + fi } # vim: set ts=4 : |