From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-802491-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id EFFD5138CCF
	for <garchives@archives.gentoo.org>; Mon, 25 May 2015 10:04:24 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 6BAC9E0826;
	Mon, 25 May 2015 10:04:22 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C9E01E087B
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 May 2015 10:04:21 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id BB23C340B80
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 May 2015 10:04:20 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 65A529FB
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 May 2015 10:04:19 +0000 (UTC)
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" <vapier@gentoo.org>
Message-ID: <1426004089.791f8201d0318fc9e41c27d698d558cac497e40e.vapier@OpenRC>
Subject: [gentoo-commits] proj/netifrc:master commit in: net/
X-VCS-Repository: proj/netifrc
X-VCS-Files: net/iproute2.sh
X-VCS-Directories: net/
X-VCS-Committer: vapier
X-VCS-Committer-Name: Mike Frysinger
X-VCS-Revision: 791f8201d0318fc9e41c27d698d558cac497e40e
X-VCS-Branch: master
Date: Mon, 25 May 2015 10:04:19 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: cfbac899-9139-49ae-b02c-dd683f2c7ea6
X-Archives-Hash: 59e0cae0341326ea30890ce0b2b2268e

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()