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:20 +0000 (21:00 +0200)
commit46794ea2fb6befecf158de0c7de3e8bedebcd03a
treeec3b52652b9ae71f2b41b8d786df5b394c6d7df1
parent364567095237236f67806a7de0c9734b5e68affb
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