]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Pass the nas server community as an argument to the snmpfinger script
authorkkalev <kkalev>
Tue, 16 Apr 2002 11:55:40 +0000 (11:55 +0000)
committerkkalev <kkalev>
Tue, 16 Apr 2002 11:55:40 +0000 (11:55 +0000)
bin/snmpfinger

index b9dda8b109e4d361d5653e25c5325d4a7d9cc1d0..d8e24dc59c0893ce151c0b708dc31d4afed6a773 100755 (executable)
@@ -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);