commit:     791f8201d0318fc9e41c27d698d558cac497e40e
Author:     Thomas D <whissi <AT> whissi <DOT> de>
AuthorDate: Wed Apr 16 09:52:26 2014 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Mar 10 16:14:49 2015 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=791f8201

net/iproute2: No need to use 'grep' for checking tentative state

We don't need 'grep' to check the tentative state, because the 'ip' utility
has a builtin command for that.

X-Gentoo-Bug: 488260
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=488260

 net/iproute2.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/iproute2.sh b/net/iproute2.sh
index 8053b2f..0b2a8d6 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -345,8 +345,9 @@ iproute2_pre_start()
 
 _iproute2_ipv6_tentative()
 {
-       LC_ALL=C ip addr show dev "${IFACE}" | \
-               grep -q "^[[:space:]]*inet6 .* tentative"
+       [ -n "$(LC_ALL=C ip -family inet6 addr show dev ${IFACE} tentative)" ] 
&& return 0
+
+       return 1
 }
 
 iproute2_post_start()

Reply via email to