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

Reply via email to