On Wed, 2005-05-04 at 03:01, Alex Burger wrote: > A Dread_config shows that the config files are processed in this order: > > snmpd.conf > agentx.conf > snmp.conf > snmpd.conf > agentx.conf > snmp.conf > > I don't know why everything is done twice
The first pass is run *before* the MIB files are loaded in, and is used to allow the config files to adjust where to look. The only configure directives that are processed are those registered using 'netsnmp_ds_register_premib()' The second pass is run *after* the MIB files have been loaded, and processes all the configure directives that were registered using 'netsnmp_ds_register_config()'. These can therefore make use of MIB object names (which the premib directives can't). > The first time it didn't seem to recognize the persistentDir registered using netsnmp_ds_register_config(ASN_OCTET_STR, "snmp", "persistentDir",... (in snmp_api.c) > although it did recognize miballowunderline, registered using netsnmp_ds_register_premib(ASN_BOOLEAN, "snmp", "mibAllowUnderline", (in mib.c) > while the second time it *does* recognize it. By then it's too late > as snmpd.conf has already been searched. > > Is it possible to change the order so that snmp.conf is searched first > so that persistentDir is correctly set before trying to load the > persistent file? You could try tweaking the "persistentDir" registration so that it uses netsnmp_ds_register_premib() instead. I'm not sure whether this is safe or not, but it's probably worth a try. Robert, Wes - any reason why this is a Bad Idea? Dave ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders