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/weather/openweather_ | ||
|---|---|---|
| 83 | 83 |
EOF |
| 84 | 84 |
|
| 85 | 85 |
# Continue if dirty config is enabled |
| 86 |
[ "$MUNIN_CAP_DIRTYCONFIG" = 1 ] || exit 0
|
|
| 86 |
[ "${MUNIN_CAP_DIRTYCONFIG:-0}" = 1 ] || exit 0
|
|
| 87 | 87 |
fi |
| 88 | 88 |
|
| 89 | 89 |
TEMP_AVG=$( expr "$OWAPI" : '.*\<temperature value=\"\(.*\)\" min.*/temperature.*' ) |
Formats disponibles : Unified diff