usb-modeswitch: Fix a condition to compare default product id and switched product id on startup.

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

Signed-off-by: Kentaro Matsuyama <kentaro.matsuyama@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28872 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2011-11-09 02:59:10 +00:00
parent 7516b28564
commit de6f2b150b
2 changed files with 2 additions and 2 deletions

View File

@ -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

View 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%% *}"
if [ $(sanitize "$usb_dir/idProduct") -eq $uPid ]; then
if [ $(sanitize "$usb_dir/idProduct") = $uPid ]; then
log "switching seemingly failed"
else
switching_done=1