/usr/share/whereami/tests/testreceived is in whereami 0.3.34-0.3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/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 $?
|