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/postgresql/pgbouncer_server_connections | ||
|---|---|---|
| 46 | 46 |
echo ${pool}.type GAUGE
|
| 47 | 47 |
done |
| 48 | 48 |
|
| 49 |
# If dirty config capability is enabled then fall through |
|
| 50 |
# to output the data with the config information. |
|
| 51 |
if [ "$MUNIN_CAP_DIRTYCONFIG" = "" ]; then |
|
| 52 |
exit 0 |
|
| 53 |
fi |
|
| 49 |
# If dirty config capability is enabled then fall through |
|
| 50 |
# to output the data with the config information. |
|
| 51 |
if [ "${MUNIN_CAP_DIRTYCONFIG:-0}" != "1" ]; then exit 0; fi
|
|
| 54 | 52 |
fi |
| 55 | 53 |
|
| 56 | 54 |
# Output looks like this: |
Formats disponibles : Unified diff