Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.sbin/tcpdump simplify



details:   https://anonhg.NetBSD.org/src/rev/53ab53cd5910
branches:  trunk
changeset: 778823:53ab53cd5910
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 15 03:05:57 2012 +0000

description:
simplify

diffstat:

 tests/usr.sbin/tcpdump/t_tcpdump.sh |  15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diffs (29 lines):

diff -r 779233cd7fee -r 53ab53cd5910 tests/usr.sbin/tcpdump/t_tcpdump.sh
--- a/tests/usr.sbin/tcpdump/t_tcpdump.sh       Sun Apr 15 00:34:09 2012 +0000
+++ b/tests/usr.sbin/tcpdump/t_tcpdump.sh       Sun Apr 15 03:05:57 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_tcpdump.sh,v 1.2 2012/04/14 15:13:57 jruoho Exp $
+# $NetBSD: t_tcpdump.sh,v 1.3 2012/04/15 03:05:57 christos Exp $
 #
 # Copyright (c) 2012 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,16 +41,9 @@
 
 promiscuous_body() {
 
-       ifs="lo0 age0 ath0 bge0 dge0 re0 rtk0 sip0 sk0 iwn0 vr0 wm0 wpi0"
-
-       for i in $ifs; do
-
-               ifconfig $i >/dev/null 2>&1
-
-               if [ $? -eq 0 ]; then
-                       echo "Testing $i"
-                       prom $i
-               fi
+       for i in $(ifconfig -l); do
+               echo "Testing $i"
+               prom $i
        done
 }
 



Home | Main Index | Thread Index | Old Index