#!MARKER_SHELL_CMD PATH=/bin:/usr/bin PROGNAME=`basename $0` ############################################################################### # # # DUMMY LINK USE COUNTER # # ############################################################################### ############################################################################### # # Things you should know about this script: # # It is stored under RCS! Keep it that way! If you want a history of # changes made to this script then refer to rlog(1) - don't look here! # ############################################################################### ############################################################################### # # CONFIGURABLE STUFF STARTS HERE # ############################################################################### ############################################################################### # # CONFIGURABLE STUFF ENDS HERE # ############################################################################### VERSION="MARKER_PATCHLEVEL" # $Header: /home/ahuxley/dev/supported/ppplc/lib/misc/RCS/usecnt-dummy.shpp,v 1.4 1999/04/28 11:10:19 alexis Exp ahuxley $ SNDMSG=MARKER_LCLBINDIR/sndmsg ############################################################################### # # MAIN FUNCTION (called from very bottom of script) # ############################################################################### main() { ########################################################################### # # PROCESS OPTIONS # ########################################################################### while [ "X$1" != X ]; do case "$1" in -V) echo "$PROGNAME version $VERSION" exit 0 ;; -d) [ "X$2" = X ] && usage VERBOSE_LEVEL=$2 shift ;; -v) VERBOSE_LEVEL=3 ;; -*) usage ;; *) break ;; esac shift done ########################################################################### # # GET USE COUNT # ########################################################################### info "getting use count for $1" # This uses the packet count on the specified interface from /proc. if [ -f /tmp/idle ]; then USECOUNT=123 else USECOUNT=$$ fi info "use count is $USECOUNT" $SNDMSG 39 $USECOUNT } usage() { { echo "Usage: $PROGNAME [ -d | -v ] " echo " $PROGNAME -V" } >&2 exit 1 } #shpp include utils.sh.shpp #shpp include gep.sh.shpp