3 if [ -e /proc/modules ] ; then
4 modprobe pg3 >& /dev/null
5 modprobe pktgen >& /dev/null
8 for PGDEV in /proc/net/pg /proc/net/pktgen/pg0 / ; do
9 [ -e ${PGDEV} ] && break
11 if [ "${PGDEV}" = "/" ] ; then
12 echo "Could not locate pg in /proc/net" 1>&2
21 result=`cat ${PGDEV} | fgrep "Result: OK:"`
22 if [ "$result" = "" ]; then
23 cat ${PGDEV} | fgrep Result:
28 echo inject > ${PGDEV}