From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1242689-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A98641382C5
	for <garchives@archives.gentoo.org>; Mon, 18 Jan 2021 12:33:38 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E8277E0801;
	Mon, 18 Jan 2021 12:33:37 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D0E10E0801
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Jan 2021 12:33:37 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 997E3340C98
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Jan 2021 12:33:36 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 26929487
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Jan 2021 12:33:35 +0000 (UTC)
From: "Lars Wendler" <polynomial-c@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, "Lars Wendler" <polynomial-c@gentoo.org>
Message-ID: <1610973151.e08ad3fd1aa2fca27ddf0ad7dfeedb82db4a3666.polynomial-c@OpenRC>
Subject: [gentoo-commits] proj/netifrc:master commit in: net/
X-VCS-Repository: proj/netifrc
X-VCS-Files: net/pppd.sh
X-VCS-Directories: net/
X-VCS-Committer: polynomial-c
X-VCS-Committer-Name: Lars Wendler
X-VCS-Revision: e08ad3fd1aa2fca27ddf0ad7dfeedb82db4a3666
X-VCS-Branch: master
Date: Mon, 18 Jan 2021 12:33:35 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: c8d02949-8a8d-4ea8-8f61-58e5fb44fb82
X-Archives-Hash: f4c980fe3f2f63c66439b18001409abc

commit:     e08ad3fd1aa2fca27ddf0ad7dfeedb82db4a3666
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 11:44:10 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 12:32:31 2021 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=e08ad3fd

net/pppd.sh: Improved pppd version check

Ed Wildgoose reported an issue with pppd version check if plugins are
also to be initialized. I this case "pppd --version" also reports the
plugins and that can confuse our original version check.

Bug: https://bugs.gentoo.org/729920
Thanks-to: Ed Wildgoose <ed+git <AT> wildgooses.com>
Closes: https://github.com/gentoo/netifrc/pull/33
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net/pppd.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/pppd.sh b/net/pppd.sh
index 42495a7..2182497 100644
--- a/net/pppd.sh
+++ b/net/pppd.sh
@@ -23,7 +23,7 @@ requote()
 
 pppd_is_ge_248()
 {
-	local ver_str="$(/usr/sbin/pppd --version 2>&1 | grep -o '[[:digit:]\.]\+')"
+	local ver_str="$(/usr/sbin/pppd --version 2>&1 | awk '/pppd version/ {print $3}')"
 	local maj_ver="$(echo ${ver_str} | cut -d . -f 1)"
 	local min_ver="$(echo ${ver_str} | cut -d . -f 2)"
 	local patch_ver="$(echo ${ver_str} | cut -d . -f 3)"