in reply to Re^4: SNMP MIB files...
in thread SNMP MIB files...

Additional information: Net-SNMP comes with a handy little script that - if it's in the user's PATH - helps find the site-wide MIBs. E.g.:

$SITE_PREFIX = `net-snmp-config --prefix`; chomp $SITE_PREFIX; $DEF_MIB_DIR = "$SITE_PREFIX/share/snmp/mibs";
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!

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