Révision c81c20ab
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)
| plugins/bind/bind9_socket_stats | ||
|---|---|---|
| 67 | 67 |
echo ${key}.type COUNTER
|
| 68 | 68 |
done |
| 69 | 69 |
|
| 70 |
# If dirty config capability is enabled then fall through |
|
| 71 |
# to output the data with the config information. |
|
| 72 |
if [ "$MUNIN_CAP_DIRTYCONFIG" = "" ]; then |
|
| 73 |
exit 0 |
|
| 74 |
fi |
|
| 70 |
# If dirty config capability is enabled then fall through |
|
| 71 |
# to output the data with the config information. |
|
| 72 |
if [ "${MUNIN_CAP_DIRTYCONFIG:-0}" != "1" ]; then exit 0; fi
|
|
| 75 | 73 |
fi |
| 76 | 74 |
|
| 77 | 75 |
# Output the stats. |
Formats disponibles : Unified diff