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/streaming/packetship_ | ||
|---|---|---|
| 108 | 108 |
|
| 109 | 109 |
# If dirty config capability is enabled then fall through |
| 110 | 110 |
# to output the data with the config information. |
| 111 |
if [ "$MUNIN_CAP_DIRTYCONFIG" = "" ]; then |
|
| 112 |
exit 0 |
|
| 113 |
fi |
|
| 111 |
if [ "${MUNIN_CAP_DIRTYCONFIG:-0}" != "1" ]; then exit 0; fi
|
|
| 114 | 112 |
fi |
| 115 | 113 |
|
| 116 | 114 |
# If there are no pumps then output fake pump1 data and end. |
Formats disponibles : Unified diff