dod38fr / config-model

Perl module to create configuration editor with semantic validation
58 stars 12 forks source link

Warning when setting a boolean with cme modify #19

Closed dod38fr closed 6 years ago

dod38fr commented 6 years ago

In /etc/LCDd.conf, set ReportToSyslog=oui (it's an invalid parameter).

Then run:

$ sudo cme modify lcdproc 'server ReportToSyslog=yes' -force
cme: using LCDd model
Argument "oui" isn't numeric in array or hash lookup at /usr/share/perl5/Config/Model/Value.pm line 1774.
Changes applied to lcdproc configuration:
- server ReportToSyslog: 'no' -> 'yes'

The warning does not help

dod38fr commented 6 years ago

This warning is due to the fact that cme -force uses check => no so bad values are stored in the configuration tree. This was done with #15 to avoid triggering an error while loading a license short_name that refer to a not-yet-existing license. See the comment at the end of this mail

Possible solutions:

dod38fr commented 6 years ago

Solved in v2.124 with 890e9cdd9d101372118e1d3e73560f130efc0a46 (i got the wrong issue number in that commit)