Package: usb-modeswitch
Version: 2.2.1+repack0-1
Severity: normal
Tags: patch
Dear Maintainer,
Plugging my Huawei e3131 fails to trigger modeswitch (systemd).
The problem seems to be that usb_modeswitch.tcl doesn't parse the device
identifier correctly.
I've only this device to test, but with the attached patch I get modeswitch
when pluged in directly or plugged into a hub.
-- System Information:
Debian Release: 8.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: armhf (armv7l)
Kernel: Linux 3.18.0-trunk-rpi2 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages usb-modeswitch depends on:
ii libc6 2.19-18
ii libjim0.75 0.75-1
ii libusb-1.0-0 2:1.0.19-1
ii usb-modeswitch-data 20150115-1
usb-modeswitch recommends no packages.
Versions of packages usb-modeswitch suggests:
pn comgt <none>
pn wvdial <none>
-- no debconf information
Index: usb-modeswitch-2.2.1+repack0/usb_modeswitch.tcl
===================================================================
--- usb-modeswitch-2.2.1+repack0.orig/usb_modeswitch.tcl
+++ usb-modeswitch-2.2.1+repack0/usb_modeswitch.tcl
@@ -55,7 +55,7 @@ if {[lindex $argv 0] == "--symlink-name"
if {[lindex $argv 0] == "--switch-systemd"} {
set device [string trim [lindex $argv 1] "/-"]
- set device [regsub {/} $device "-"]
+ set device [regsub {^.*/} $device ""]
set argList [list "" $device]
Log "\nStarted via systemd"
} else {