collectd: sqm_collectd: improve error handling
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Fri, 22 May 2020 11:50:12 +0000 (12:50 +0100)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 7 Jun 2020 15:33:05 +0000 (18:33 +0300)
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 947c85bff0176c0bb7b6dce796ee32bd9fa868da)

utils/collectd/Makefile
utils/collectd/files/exec-scripts/sqm_collectd.sh

index 7e89232f21dcdf0cd11001504f83b89061d925de..20e635ea96c6140dab4ad59e024ef3626693b6c4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
 PKG_VERSION:=5.11.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://collectd.org/files/ \
index 66ba8df3876553f52c0b261e7caf239d901510f5..f158056e8ff9099007b87f98ada41afd92dae31b 100755 (executable)
@@ -80,6 +80,8 @@ process_qdisc() {
 
        ifc="$1"
        jsn=$(tc -s -j qdisc show dev "$ifc")
+       [ $? ] || return
+
        # strip leading & trailing []
        jsn="${jsn#[}" ; jsn="${jsn%]}"