File: testreceived

package info (click to toggle)
whereami 0.3.37
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 424 kB
  • sloc: sh: 1,094; perl: 524; makefile: 24
file content (17 lines) | stat: -rw-r--r-- 450 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# $Id: testreceived,v 1.2 2003/03/20 11:41:53 andrew Exp $
#
# testreceived - look for received packes on an interface
#
# Contributed by: Mike Carr <mcarr@macrolink.bc.ca>
# 
# May supply IFACE as first (and only) argument (or previously set INTERFACE)

# Turn on execution tracing, for debugging...
[ "$DEBUGWHEREAMI" = "1" ] && set -o xtrace

IFACE=${1:-$INTERFACE}

/sbin/ifconfig -s $IFACE |tail -1 |awk '$4==0 { exit 1; }'
exit $?