diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/dispatcher-fcc-unlock/105b | 4 | ||||
-rwxr-xr-x | data/dispatcher-fcc-unlock/14c3 | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/data/dispatcher-fcc-unlock/105b b/data/dispatcher-fcc-unlock/105b index 95e3cc57..ed92e6a8 100644 --- a/data/dispatcher-fcc-unlock/105b +++ b/data/dispatcher-fcc-unlock/105b @@ -22,8 +22,8 @@ for PORT in "$@"; do # match port type in Linux 5.14 and newer grep -q MBIM "/sys/class/wwan/$PORT/type" 2>/dev/null || # match port name in Linux 5.13 - echo "$PORT" | grep -q MBIM && { - MBIM_PORT=$PORT + echo "$PORT" | grep -qi MBIM && { + MBIM_PORT="$PORT" break } done diff --git a/data/dispatcher-fcc-unlock/14c3 b/data/dispatcher-fcc-unlock/14c3 index 8efeb73e..f4d2f0b4 100755 --- a/data/dispatcher-fcc-unlock/14c3 +++ b/data/dispatcher-fcc-unlock/14c3 @@ -22,8 +22,8 @@ for PORT in "$@"; do # match port type in Linux 5.14 and newer grep -q AT "/sys/class/wwan/$PORT/type" 2>/dev/null || # match port name in Linux 5.13 - echo "$PORT" | grep -q AT && { - AT_PORT=$PORT + echo "$PORT" | grep -qi AT && { + AT_PORT="$PORT" break } done @@ -31,7 +31,7 @@ done # fail if no AT port exposed [ -n "$AT_PORT" ] || exit 2 -DEVICE=/dev/${AT_PORT} +DEVICE="/dev/$AT_PORT" at_command() { exec 99<>"$DEVICE" |