[Nut-upsdev] New configuration format, parser, libupsconfig and upsconfig : some news ^_^

Jonathan Dion dion.jonathan at gmail.com
Mon Jul 24 14:59:35 UTC 2006


Hello nut-upsdev !

It's me again !
Since my last email about the new formalism for NUT configuration files, no
objection was drawn.
I propose then to make official this new formalism. Here can be find the
grammar of the formalism :
http://opensource.mgeups.com/projects/nut-config/grammar.od

I made a parser for the new formalism and put sample files and a test
program on my branch (JD-NewConf branch, in test directory). The test_parser
take a file name as parameter, parse it and then print the tree
corresponding to the file.
Please feel free to play with it and to torture it. I think there is no bug
(I tested it with valgrind), but if you see one, please tell me.
I put a Makefile in the test directory and modified Makefile.in, so just run
./configure and then make as usual.
You'll have to change the include directive in nut.conf and passwd.conf to
be adapted to where you put the file in your system. You must a full path,
else test_parser will search the file in your default NUT configuration
directory. When launching nut_parser, also give the full path to nut.conf,
else it will not be able to open it.

As announced in my first email, here is a draft about the API of
libupsconfig this time (
http://opensource.mgeups.com/projects/nut-config/API_draft2.odt) and here a
reflection on upsconfig tool (
http://opensource.mgeups.com/projects/nut-config/upsconfig_draft2.odt).
Please let me know if you have any objection/suggestion/reflection about it.

Thank for your attention ^_^

Jonathan Dion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20060724/ab99716f/attachment.htm


More information about the Nut-upsdev mailing list