head 1.4; access; symbols; locks ahuxley:1.4; strict; comment @# @; 1.4 date 99.04.28.11.10.19; author alexis; state Exp; branches; next 1.3; 1.3 date 99.01.07.13.19.09; author alexis; state Exp; branches; next 1.2; 1.2 date 98.08.28.17.41.13; author alexis; state Exp; branches; next 1.1; 1.1 date 98.08.28.13.42.52; author alexis; state Exp; branches; next ; desc @DUMMY VERSION OF USECNT FOR TESTING @ 1.4 log @added gep.sh.shpp usage @ text @#!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: /diskb/home/alexis/dev/supported/ppplc/lib/misc/RCS/usecnt-dummy.shpp,v 1.3 1999/01/07 13:19:09 alexis Exp alexis $ 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 @ 1.3 log @symbol name changes @ text @d33 1 a33 1 # $Header: usecnt-dummy.shpp,v 1.2 1998/08/28 17:41:13 alexis Exp alexis $ d94 1 @ 1.2 log @removed version number tests @ text @d1 1 a1 1 #!SCRIPTSHELLCMD_MARKER d32 3 a34 3 VERSION="PATCHLEVEL_MARKER" # $Id: usecnt-dummy.shpp,v 1.1 1998/08/28 13:42:52 alexis Exp alexis $ SNDMSG=LCLSBINDIR_MARKER/sndmsg d93 1 a93 2 #shpp include utils.sh @ 1.1 log @Initial revision @ text @d33 1 a33 1 # $Id: usecnt.in,v 1.2 1998/08/27 15:38:42 alexis Exp alexis $ d53 2 a54 7 -V) if expr "$VERSION" : 'P.*R$' > /dev/null; then warning "this is a development version; use 'ident' for version information" exit 1 else echo "$PROGNAME version $VERSION" exit 0 fi ;; @