From: kkalev Date: Tue, 16 Apr 2002 11:55:40 +0000 (+0000) Subject: Pass the nas server community as an argument to the snmpfinger script X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=d44bb755a750cd10548b82aa33b96b7ca0f9bcdb;p=freeradius-dialup-admin.git Pass the nas server community as an argument to the snmpfinger script --- diff --git a/bin/snmpfinger b/bin/snmpfinger index b9dda8b..d8e24dc 100755 --- a/bin/snmpfinger +++ b/bin/snmpfinger @@ -1,9 +1,11 @@ #!/usr/bin/perl $SNMPWALK="/usr/bin/snmpwalk"; +$host=shift; +$comm=shift || 'public'; -$walk =`$SNMPWALK $ARGV[0] public .iso.org.dod.internet.private.enterprises.9.2.9.2.1.18`; -$walk.=`$SNMPWALK $ARGV[0] public .iso.org.dod.internet.private.enterprises.9.9.27.1.1.3.1.7`; +$walk =`$SNMPWALK $host $comm .iso.org.dod.internet.private.enterprises.9.2.9.2.1.18`; +$walk.=`$SNMPWALK $host $comm .iso.org.dod.internet.private.enterprises.9.9.27.1.1.3.1.7`; while($walk=~/\"(\w+?)\"/g){ $user=lc($1);