i'm using perl to extend the functionality of snmp.

i'm doing something like this from the perl script to handle snmpset


if ( $ARGV[0] eq "-s")

$oid = $ARGV[1];
$tot = $ARGV[3];
@parts = split(/\.\.\./, $tot);

if ( ($parts[0] eq "delete") && ($oid eq
".") )
`/bin/rm -rf /mnt/gluster/$parts[1]`;
$sortida = system("/bin/ls -alis /mnt/gluster |
/bin/grep $parts[1]");
print "ok"; ##tot ok
else { print "not-writable"; } ##ha fallat
exit 0;


The thing is that if i run this command:

snmpset -v 2c -c mykey localhost . s

i get this in the shell.......

UCD-SNMP-MIB::ucdavis. = STRING: "delete...bustia01"

so... what i would like to do is replacing this "STRING:
"delete...bustia01" witch something else dynamically, let's say a value
that is calculated within the if

if ( ($parts[0] eq "delete") && ($oid eq ".") )

has anyone succeeded in doing this?

Thank you.

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: