From a8220ab2d293bb7f4b014b79d16b2fb05090fa93 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Feb 2021 12:45:55 +0100 Subject: Adding upstream version 1.29.0. Signed-off-by: Daniel Baumann --- collectors/charts.d.plugin/ap/ap.chart.sh | 60 +++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'collectors/charts.d.plugin/ap/ap.chart.sh') diff --git a/collectors/charts.d.plugin/ap/ap.chart.sh b/collectors/charts.d.plugin/ap/ap.chart.sh index a2d04c0a7..5dd787835 100644 --- a/collectors/charts.d.plugin/ap/ap.chart.sh +++ b/collectors/charts.d.plugin/ap/ap.chart.sh @@ -16,9 +16,9 @@ declare -A ap_devs=() # _check is called once, to find out if this chart should be enabled or not ap_check() { - require_cmd iw || return 1 - local ev - ev=$(run iw dev | awk ' + require_cmd iw || return 1 + local ev + ev=$(run iw dev | awk ' BEGIN { i = ""; ssid = ""; @@ -41,26 +41,26 @@ ap_check() { } } ') - eval "${ev}" + eval "${ev}" - # this should return: - # - 0 to enable the chart - # - 1 to disable the chart + # this should return: + # - 0 to enable the chart + # - 1 to disable the chart - [ ${#ap_devs[@]} -gt 0 ] && return 0 - error "no devices found in AP mode, with 'iw dev'" - return 1 + [ ${#ap_devs[@]} -gt 0 ] && return 0 + error "no devices found in AP mode, with 'iw dev'" + return 1 } # _create is called once, to create the charts ap_create() { - local ssid dev + local ssid dev - for dev in "${!ap_devs[@]}"; do - ssid="${ap_devs[${dev}]}" + for dev in "${!ap_devs[@]}"; do + ssid="${ap_devs[${dev}]}" - # create the chart with 3 dimensions - cat <