From 9bd7bb0392d517e72efe864897baa9086d912182 Mon Sep 17 00:00:00 2001 From: Jongmin Kim Date: Sun, 9 Mar 2025 09:50:48 +0900 Subject: [PATCH] fcc-unlock: Reduce the port assignment cases Signed-off-by: Jongmin Kim --- data/dispatcher-fcc-unlock/105b | 5 +---- data/dispatcher-fcc-unlock/14c3 | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/data/dispatcher-fcc-unlock/105b b/data/dispatcher-fcc-unlock/105b index aa88261f..95e3cc57 100644 --- a/data/dispatcher-fcc-unlock/105b +++ b/data/dispatcher-fcc-unlock/105b @@ -20,10 +20,7 @@ shift # second and next arguments are control port names for PORT in "$@"; do # match port type in Linux 5.14 and newer - grep -q MBIM "/sys/class/wwan/$PORT/type" 2>/dev/null && { - MBIM_PORT=$PORT - break - } + 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 diff --git a/data/dispatcher-fcc-unlock/14c3 b/data/dispatcher-fcc-unlock/14c3 index 51217f4d..8efeb73e 100755 --- a/data/dispatcher-fcc-unlock/14c3 +++ b/data/dispatcher-fcc-unlock/14c3 @@ -20,10 +20,7 @@ shift # second and next arguments are control port names for PORT in "$@"; do # match port type in Linux 5.14 and newer - grep -q AT "/sys/class/wwan/$PORT/type" 2>/dev/null && { - AT_PORT=$PORT - break - } + 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