Hi, I want to update a line in an application configuration file during the commit phase of an SNMP SET operation. I am noticing the read_config_store appends a new line to the configuration file when I want to replace a line. This config file lives in the net-snmp persistent directory.
I've had no problems using the register_config_handler() routine and am getting the callback when my token is read during snmpd startup. As of now, I am searching for a way to do essentially what snmp_save_persistent() does, short of adding the warning banner to the top of the file. Looking at the Net-SNMP implemented code base, it appears the preferred method for updating configuration from the daemon is to move the configuration off to the side and write a new configuration file with the changed values. If anyone can suggest a method for either: (a) overwriting the given token line with the new value, or (b) short of re-writting snmp_save_persistent, achieve the desired behavior without the banner. (c) using other means to achieve same goal Any follow-ups are appreciated! Regards, Mark Ellison
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders