From d0ac824ec0c5d0fc3593ce90d83a007da505856e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Mon, 13 Aug 2018 13:39:52 +0200 Subject: [PATCH] Don't run openwrt hotplug script if $DEVICE is unset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Turns out hotplug scripts don't always set $DEVICE, which can leave interfaces in an unconfigured state. Thanks to David Ell for reporting the bug. Fixes #69. Signed-off-by: Toke Høiland-Jørgensen --- platform/openwrt/sqm-hotplug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/openwrt/sqm-hotplug b/platform/openwrt/sqm-hotplug index 6aa66dce..491a2a98 100755 --- a/platform/openwrt/sqm-hotplug +++ b/platform/openwrt/sqm-hotplug @@ -1,5 +1,7 @@ #!/bin/sh +[ -n "$DEVICE" ] || exit 0 + restart_sqm() { /usr/lib/sqm/run.sh stop ${DEVICE} /usr/lib/sqm/run.sh start ${DEVICE}