1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

unify DIRTYCONFIG handling in shell and python plugins

The following issues were fixed:
* comparison too broad (e.g. "0" misinterpreted as "true")
* python: comparing string with number (is never equal in python)
* unwanted non-zero exitcode (compound command "&&" as last command in
  shell code block (e.g. "case" or "if" branch))
* access to unset variable (shell style issue)
This commit is contained in:
Lars Kruse 2018-04-07 02:11:05 +02:00
parent 270be2f59e
commit c81c20ab3b
22 changed files with 32 additions and 48 deletions

View file

@ -138,7 +138,7 @@ ACTION="${1:-}"
case "$ACTION" in
config)
do_config || exit 1
[ "${MUNIN_CAP_DIRTYCONFIG:-0}" = 1 ] && do_fetch
if [ "${MUNIN_CAP_DIRTYCONFIG:-0}" = "1" ]; then do_fetch; fi
;;
autoconf)
[ -z "$(get_wifi_interfaces)" ] && echo "no (no wifi interfaces found)" && exit 1