We have a situation where some obsolete lines can appear in configuration files.
We wrote a script which needs to be automatically invoked when load is initiated. The invocation is realized via clispec:
<clispec xmlns=“http://tail-f.com/ns/clispec/1.0” style=“c”>
<configureMode>
<modifications>
<move src=“load” dest=“xload” inclSubCmds=“true”/>
<hide src=“xload”/>
</modifications>
<cmd name=“load”>
<help/>
<info>Load configuration from an ASCII file</info>
<callback>
<exec>
<osCommand>/etc/confd/cliscripts/config_filter.sh</osCommand>
.
.
Inside the script this is called to load the file:
{ confd_cli -n -g admin -u admin << EOF
config
$(echo “xload $loadType $configFile”)
EOF
}
So far so good, but the issue arises after the script finishes we try to commit changes and we get a message that there is nothing to commit. We do not want to commit inside confd_cli because this changes the current flow of operation.
Is it possible to somehow preserve the loaded configuration when confd_cli finishes?
Is there a better way to implement this automatic script invocation?
Another question is will this change affect all northbound interfaces or CLI only?
BR Jaka