luci-app-statistics: stat-genconfig: don't emit bools for absent uci options
authorJo-Philipp Wich <jo@mein.io>
Mon, 25 Apr 2022 18:55:02 +0000 (20:55 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 25 Apr 2022 19:00:35 +0000 (21:00 +0200)
commit0473e99fab038b84b4b66dba15d5c63b08d625c1
tree09b07a99b86c1c9f5e19c2d8284f11b9c6591c7e
parentfe09ab990256d8b63e76cc1ab2435baef921b8b4
luci-app-statistics: stat-genconfig: don't emit bools for absent uci options

Do not emit native collectd.conf boolean false options if the corresponding
uci option is unset in order to honour collectd's implicit defaults.

This fixes certain options, such as the memory plugins `ValuesAbsolute`,
being without effect if declared as default-enabled in the related plugin
uci forms.

Fixes: #5777
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f16037cec5e3f65cffe2f5788c264f1912435b0e)
applications/luci-app-statistics/root/usr/bin/stat-genconfig