These default product id and switched product id are hex string variables, so 
this comparison operator should be '='.

Signed-off-by: Kentaro Matsuyama <[email protected]>
---
 utils/usb-modeswitch/Makefile                 |    2 +-
 utils/usb-modeswitch/files/modeswitch.hotplug |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/usb-modeswitch/Makefile b/utils/usb-modeswitch/Makefile
index 62444f1..c033c72 100644
--- a/utils/usb-modeswitch/Makefile
+++ b/utils/usb-modeswitch/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usb-modeswitch
 PKG_VERSION:=1.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch
diff --git a/utils/usb-modeswitch/files/modeswitch.hotplug 
b/utils/usb-modeswitch/files/modeswitch.hotplug
index 7f9ce94..8042451 100644
--- a/utils/usb-modeswitch/files/modeswitch.hotplug
+++ b/utils/usb-modeswitch/files/modeswitch.hotplug
@@ -127,7 +127,7 @@ if [ "$ACTION" = add ]; then
                        [ -f "$usb_dir/idVendor" ] || usb_dir="${usb_dir%/*}"
                        while [ $switching_done -lt 1 -a $switching_tries -le 6 
]; do
                                $modeswitch -I -D -n -s 30 -c "${configs%% *}"
-                               if [ $(sanitize "$usb_dir/idProduct") -eq $uPid 
]; then
+                               if [ $(sanitize "$usb_dir/idProduct") = $uPid 
]; then
                                        log "switching seemingly failed"
                                else
                                        switching_done=1
-- 
1.7.4.1

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to