diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-20 01:19:29 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-11-20 01:19:29 +0200 |
commit | f86722e7a092f5d1c6c7815499bd61866c75045c (patch) | |
tree | 1449a86a8220a42909192ba1508c9d31bfe2b3c1 /charts.d/sensors.chart.sh | |
parent | 93921bbb7cd15c3f3a4e4f52386cf3611eadd8d0 (diff) |
normalized all charts.d plugins
Diffstat (limited to 'charts.d/sensors.chart.sh')
-rwxr-xr-x | charts.d/sensors.chart.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/charts.d/sensors.chart.sh b/charts.d/sensors.chart.sh index 76032a660c..f4ab1b240a 100755 --- a/charts.d/sensors.chart.sh +++ b/charts.d/sensors.chart.sh @@ -39,8 +39,8 @@ sensors_check() { # - 0 to enable the chart # - 1 to disable the chart - [ ! -z "$( sensors_find_all_files $sensors_sys_dir )" ] && return 0 - return 1 + [ -z "$( sensors_find_all_files $sensors_sys_dir )" ] && echo >&2 "$PROGRAM_NAME: sensors: no sensors found in '$sensors_sys_dir'." && return 1 + return 0 } sensors_check_files() { @@ -55,7 +55,7 @@ sensors_check_files() { v=$(( v + 1 - 1 )) [ $v -ne 0 ] && echo "$f" && continue - echo >&2 "charts.d: sensors: $f gives zero values" + echo >&2 "$PROGRAM_NAME: sensors: $f gives zero values" done } @@ -74,7 +74,7 @@ sensors_check_temp_type() { v=$(( v + 1 - 1 )) [ $v -ne 0 ] && echo "$f" && continue - echo >&2 "charts.d: sensors: $f is disabled" + echo >&2 "$PROGRAM_NAME: sensors: $f is disabled" done } |