Just wonder whether confd.conf can include or import another config file ?
I have a ‘sub_confd.conf’, which has configs of “loadPath”. whether confd.conf can include or import this ‘sub_confd.conf’ to load the configs in it to confd.conf ?
Hm, this reminds me that there is a somewhat “similar” but probably much less sophisticated tool included in the ConfD release - xmlset. It is only shipped as source, in the $CONFD_DIR/src/confd/tools directory, and has its own Makefile there:
$ cd $CONFD_DIR/src/confd/tools
$ make -f Makefile.xmlset
cc -std=c99 -Wall -pedantic -c -o xmlset.o xmlset.c
(omit warnings that could easily be fixed)
cc -std=c99 -Wall -pedantic -o xmlset xmlset.o -lexpat
$ ./xmlset --help
Usage: ./xmlset R Tag ... < XmlFile
Usage: ./xmlset C NewValue Tag ... < XmlFile
(where R is for Remove and C is for Change). Might be useful for trivial changes. You can of course also use a generic text processor such as m4 to combine bits and pieces into the final confd.conf.