From ec6cdb8209bb17dacc745f757c6f4cbdd430a354 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 28 Jun 2021 19:32:36 +0200 Subject: [PATCH] Fix modem device --- luci-app-openmptcprouter/root/etc/init.d/openmptcprouter | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter index 42ed7d1b9..351cac58b 100755 --- a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter +++ b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter @@ -20,7 +20,7 @@ omr_intf_set() { local ifname config_get ifname "$1" device [ -z "$ifname" ] && config_get ifname "$1" ifname - config_get device "$1" device + config_get devicename "$1" _modem_device config_get type "$1" type [ -z "$ifname" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') @@ -39,7 +39,7 @@ omr_intf_set() { uci -q delete network.$1.modalias uci -q delete network.$1.product fi - elif [ "$type" != "macvlan" ] && [ -n "$device" ] && [ -f /sys/bus/usb-serial/devices/${devicename}/device/uevent ] && [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT)" != "" ]; then + elif [ "$type" != "macvlan" ] && [ -n "$devicename" ] && [ -f /sys/bus/usb-serial/devices/${devicename}/device/uevent ] && [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT)" != "" ]; then mac="" if [ -f /sys/class/net/${ifname}/address ]; then mac="$(cat /sys/class/net/${ifname}/address | tr -d '\n')"