in reply to Re^4: SNMP MIB files...
in thread SNMP MIB files...
I should be able to create a subdirectory under that named after my package, then subdirs as usual. Then use the addMibDir() trick above combined with the readdir() method suggested by idsfa, and I think we're there!$SITE_PREFIX = `net-snmp-config --prefix`; chomp $SITE_PREFIX; $DEF_MIB_DIR = "$SITE_PREFIX/share/snmp/mibs";
I'll still want to add some exception handling code for the cases where net-snmp-config can't be found or the MIB files were moved (e.g. can't stat "$SITE_PREFIX/share/snmp/mibs"), and some other stuff. Might put some user-prompting in there for help, but this is getting close.
--Rhys
|
|---|