usb-modeswitch: Fix a condition to compare default product id and switched product...
[openwrt/svn-archive/archive.git] / utils / usb-modeswitch / files / modeswitch.hotplug
index 7f9ce9411d1e45363aebb18b2d6e335d5927f22d..8042451373b57bd13a714923fd17243127460ecd 100644 (file)
@@ -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%% *}"
                        [ -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
                                        log "switching seemingly failed"
                                else
                                        switching_done=1