- Timestamp:
- 07/10/07 14:45:33 (18 months ago)
- Files:
-
- 1 modified
-
trunk/etc/openct_usb.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/etc/openct_usb.in
r961 r984 5 5 test -e /var/run/openct/status || exit 0 6 6 7 # race condition in the kernel, $DEVICE might not exist now8 sleep 0.19 10 7 if [ -n "$DEVICE" ] 11 8 then 12 # if you see two ifdhandlers for one device, then you can 13 # either comment out the next line here ... 14 SBINDIR/openct-control attach usb:$PRODUCT usb $DEVICE 15 exit 0 9 for A in `seq 10` 10 do 11 if test -e $DEVICE 12 then 13 # if you see two ifdhandlers for one device, then you can 14 # either comment out the next line here ... 15 SBINDIR/openct-control attach usb:$PRODUCT usb $DEVICE 16 exit 0 17 fi 18 sleep 0.1 19 done 20 echo "$0 waited for $DEVICE but it did not appear." \ 21 |logger -p daemon.error 22 exit 1 16 23 fi 17 24 18 25 if [ -n "$DEVNAME" ] 19 26 then 20 V="`cat /sys/$DEVPATH/device/idVendor |sed -e "s/^0*//"`" 21 P="`cat /sys/$DEVPATH/device/idProduct|sed -e "s/^0*//"`" 22 D="`cat /sys/$DEVPATH/device/bcdDevice |sed -e "s/^0*//"`" 23 PRODUCT="$V/$P/$D" 24 # or the following line. both should disable that effect. 25 SBINDIR/openct-control attach usb:$PRODUCT usb $DEVNAME 27 for A in `seq 10` 28 do 29 if test -e $DEVNAME 30 then 31 V="`cat /sys/$DEVPATH/device/idVendor |sed -e "s/^0*//"`" 32 P="`cat /sys/$DEVPATH/device/idProduct|sed -e "s/^0*//"`" 33 D="`cat /sys/$DEVPATH/device/bcdDevice |sed -e "s/^0*//"`" 34 PRODUCT="$V/$P/$D" 35 # or the following line. both should disable that effect. 36 SBINDIR/openct-control attach usb:$PRODUCT usb $DEVNAME 37 38 exit 0 39 fi 40 sleep 0.1 41 done 42 echo "$0 waited for $DEVNAME but it did not appear." \ 43 |logger -p daemon.error 44 exit 1 45 fi 46 47 ) & 48 disown %1 49 26 50 exit 0 27 51 fi
