[packages] usb-modeswitch: wait a second before retrying modeswitching, this reportedly helps to kick some dongles into operation

git-svn-id: svn://svn.openwrt.org/openwrt/packages@32602 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-07-04 12:02:23 +00:00
parent a958ad22c8
commit acb939b949
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2008-2011 OpenWrt.org # Copyright (C) 2008-2012 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=usb-modeswitch PKG_NAME:=usb-modeswitch
PKG_VERSION:=1.2.3 PKG_VERSION:=1.2.3
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch

View File

@ -128,7 +128,8 @@ if [ "$ACTION" = add ]; then
while [ $switching_done -lt 1 -a $switching_tries -le 6 ]; do while [ $switching_done -lt 1 -a $switching_tries -le 6 ]; do
$modeswitch -v $uVid -p $uPid -I -D -n -s 30 -c "${configs%% *}" $modeswitch -v $uVid -p $uPid -I -D -n -s 30 -c "${configs%% *}"
if [ $(sanitize "$usb_dir/idProduct") = $uPid ]; then if [ $(sanitize "$usb_dir/idProduct") = $uPid ]; then
log "switching seemingly failed" log "$DEVICENAME: Switching seemingly failed"
sleep 1
else else
switching_done=1 switching_done=1
fi fi