collectd: sqm_collectd: improve error handling
[feed/packages.git] / utils / collectd / files / exec-scripts / sqm_collectd.sh
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%]}"