collectd: sqm_collectd: improve error handling

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 947c85bff0)
This commit is contained in:
Kevin Darbyshire-Bryant
2020-05-22 12:50:12 +01:00
committed by Hannu Nyman
parent f89580290c
commit 9a38e786f8
2 changed files with 3 additions and 1 deletions
@@ -80,6 +80,8 @@ process_qdisc() {
ifc="$1"
jsn=$(tc -s -j qdisc show dev "$ifc")
[ $? ] || return
# strip leading & trailing []
jsn="${jsn#[}" ; jsn="${jsn%]}"