Projet

Général

Profil

Révision c81c20ab

IDc81c20ab3b60512ac86beaa0a0ea4dfafa76e1dd
Parent 270be2f5
Enfant cc0b0949

Ajouté par Lars Kruse il y a plus de 7 ans

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)

Voir les différences:

plugins/bind/bind9_server_stats
69 69
		echo ${key}.type COUNTER
70 70
	done
71 71

  
72
        # If dirty config capability is enabled then fall through
73
        # to output the data with the config information.
74
        if [ "$MUNIN_CAP_DIRTYCONFIG" = "" ]; then
75
                exit 0
76
        fi
72
	# If dirty config capability is enabled then fall through
73
	# to output the data with the config information.
74
	if [ "${MUNIN_CAP_DIRTYCONFIG:-0}" != "1" ]; then exit 0; fi
77 75
fi
78 76

  
79 77
# Output the stats.

Formats disponibles : Unified diff