[LEDE-DEV] [PATCH 3/3] usbmode: remove devices with unsupported modes

Julian Labus julian at labus-online.de
Wed May 24 07:32:18 PDT 2017


remove files which include the following mode options
BlackberryMode OptionMode PantechMode QuantaMode

Signed-off-by: Julian Labus <julian at labus-online.de>
---
 package/utils/usbmode/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index 7f0195fdce..1b1ef147b6 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -40,8 +40,13 @@ endef
 define Build/Prepare
 	$(Build/Prepare/Default)
 	tar xvfj $(DL_DIR)/$(PKG_DATA_FILENAME) -C $(PKG_BUILD_DIR)
-	rm -f \
-		$(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
+	#remove devices with unsupported modes
+	for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/* ; \
+	do \
+		if grep -q -E '(Quanta|Option|Blackberry|Pantech)Mode' "$$$$filevar" ; then \
+			rm "$$$$filevar" ; \
+		fi \
+	done
 	cp ./data/* $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/
 	#in order to keep the Lede GIT repo free of filenames with colons,
 	#we name the files xxxx-yyyy
-- 
2.11.0




More information about the Lede-dev mailing list