From 7000aa16b4099f89cbdadc84a8a88dc3d71bcba7 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 27 Jan 2025 19:30:11 +0100 Subject: [PATCH] Detect SQM & QoS installation using apk in openmptcprouter interface --- .../luasrc/view/openmptcprouter/wizard.htm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 1959140a2..cea83f0e1 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -11,7 +11,13 @@ local ifttyu = nixio.fs.glob("/dev/ttyUSB*") local ifttyc = nixio.fs.glob("/dev/cdc-wdm*") local sqm = luci.sys.exec("opkg list-installed | grep -q luci-app-sqm && echo -n '1' || echo -n '0'") + if sqm == "0" then + sqm = luci.sys.exec("apk list | grep installed | grep -q luci-app-sqm && echo -n '1' || echo -n '0'") + end local qos = luci.sys.exec("opkg list-installed | grep -q luci-app-qos && echo -n '1' || echo -n '0'") + if qos == "0" then + qos = luci.sys.exec("apk list | grep installed | grep -q luci-app-qos && echo -n '1' || echo -n '0'") + end menuentry = uci:get("openmptcprouter","settings","menu") or "openmptcprouter" function device_notvirtual(dev) if dev:match("^eth.*") or dev:match("^wwan.*") or dev:match("^tun.*") or dev:match("/") then