Hi Jakub, hi all,
Le samedi, 2 août 2014, 22.02:14 Jakub Wilk a écrit :
> * Didier 'OdyX' Raboud <o...@debian.org>, 2014-08-02, 19:25:
> >Would the following patch help you there?
> >
> >(…)
> I use sysvinit, so no, it wouldn't. :-P
Pff. I'm really at loss here, especially given that I can't reproduce
the problem. Here's my current line of thought:
* The udev rule seems to be working: I've successfully used the generic
one for the dongle type I own (05c6:1000) and it worked, both at plug-
time and at at boot time (under systemd only though).
* Apparently, if the udev rule triggers, the two tools are correctly
called in that order:
- /lib/udev/usb_modeswitch (shell)
- one of:
· /sbin/initctl emit --no-wait usb-modeswitch-upstart UMS_PARAM=$1
· /bin/systemctl --no-block start usb_modeswitch@$1.service
· /usr/sbin/usb_modeswitch_dispatcher --switch-mode $1 &
* The latter can fail it /tmp is not available and as it doesn't respect
TMPDIR, cannot be taught the right way (see below).
* There are some things that are specific to the new generic Huawei rule:
- New android-vs-linux switch in the tcl but I see no indication that it
would fail:
http://sources.debian.net/src/usb-modeswitch/2.2.0%2Brepack0-1/usb_modeswitch.tcl#L201
Jakub: could you (out of luck) try the attached patch that reverts this?
- The generic rules in usb-modeswitch-data has spaces:
http://sources.debian.net/src/usb-modeswitch-data/20140529-1/usb_modeswitch.d/12d1:%23linux
http://sources.debian.net/src/usb-modeswitch-data/20140529-1/usb_modeswitch.d/12d1:%23android
> More importantly, jimctl doesn't seem to honour TMPDIR. :-(
Thanks for the catch, I've reported this upstream:
https://github.com/msteveb/jimtcl/issues/17
Cheers,
OdyX
Description: Revert upstream change to discriminate android from linux
Author: Didier Raboud <o...@debian.org>
Origin: vendor
Bug-Debian: http://bugs.debian.org/751271
Last-Update: 2014-08-03
--- a/usb_modeswitch.tcl
+++ b/usb_modeswitch.tcl
@@ -197,15 +197,7 @@
# Check (and switch) for operating system if Huawei device present
-set flags(os) "linux"
-if {$usb(idVendor) == "12d1" && [regexp -nocase {android} [exec cat /proc/version]]} {
- set flags(os) "android"
-}
-if {$flags(os) == "android"} {
- set configList [ConfigGet conflist $usb(idVendor):#android]
-} else {
- set configList [ConfigGet conflist $usb(idVendor):$usb(idProduct)]
-}
+set configList [ConfigGet conflist $usb(idVendor):$usb(idProduct)]
if {[llength $configList] == 0} {
Log "Aargh! Config file missing for $usb(idVendor):$usb(idProduct)! Exit"