Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/sys_info Also report versions of tcpdump, libpcap, a...



details:   https://anonhg.NetBSD.org/src/rev/619afa44c049
branches:  trunk
changeset: 356478:619afa44c049
user:      agc <agc%NetBSD.org@localhost>
date:      Thu Sep 28 18:08:04 2017 +0000

description:
Also report versions of tcpdump, libpcap, and wpa_supplicant

Bump sys_info version to 20170928

diffstat:

 usr.bin/sys_info/sys_info.sh |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (56 lines):

diff -r 5ad9dc0e15d4 -r 619afa44c049 usr.bin/sys_info/sys_info.sh
--- a/usr.bin/sys_info/sys_info.sh      Thu Sep 28 17:48:20 2017 +0000
+++ b/usr.bin/sys_info/sys_info.sh      Thu Sep 28 18:08:04 2017 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: sys_info.sh,v 1.16 2017/09/21 07:07:28 wiz Exp $
+# $NetBSD: sys_info.sh,v 1.17 2017/09/28 18:08:04 agc Exp $
 
 # Copyright (c) 2016 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -26,7 +26,7 @@
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-SYS_INFO_VERSION=20170920
+SYS_INFO_VERSION=20170928
 
 PATH=$(sysctl -n user.cs_path)
 export PATH
@@ -187,6 +187,11 @@
        openssl)
                run "openssl version 2>/dev/null | awk '{ print tolower(\$1) \"-\" \$2 }'"
                $all || return 0 ;&
+       pcap)
+               if which_prog tcpdumppath tcpdump; then
+                       run "${tcpdumppath} -h 2>&1 | awk '\$1 == \"libpcap\" { sub(\" version \", \"-\"); print }'"
+               fi
+               $all || return 0 ;&
        pkg_info|pkg_install)
                if which_prog infopath pkg_info; then
                        run "printf 'pkg_install-%s\n' \$(${infopath} -V)"
@@ -201,6 +206,11 @@
        sys_info)
                run "printf '%s\n' sys_info-${SYS_INFO_VERSION}"
                $all || return 0 ;&
+       tcpdump)
+               if which_prog tcpdumppath tcpdump; then
+                       run "${tcpdumppath} -h 2>&1 | awk '\$1 == \"tcpdump\" { sub(\" version \", \"-\"); print }'"
+               fi
+               $all || return 0 ;&
        tcsh)
                if which_prog tcshpath tcsh; then
                        run "${tcshpath} --version | awk '{ print \$1 \"-\" \$2 }'"
@@ -223,6 +233,11 @@
        [uU]ser[lL]and|release)
                run "sed <${destdir}/etc/release -e 's/ /-/g' -e 's/^/userland-/' -e 1q"
                $all || return 0 ;&
+       wpa_supplicant)
+               if which_prog wpapath wpa_supplicant; then
+                       run "${wpapath} -v | awk 'NF == 2 { sub(\" v\", \"-\"); print }'"
+               fi
+               $all || return 0 ;&
        xz)
                run "xz --version | awk '{ print \$1 \"-\" \$4; exit }'"
                $all || return 0 ;&



Home | Main Index | Thread Index | Old Index