summaryrefslogtreecommitdiffstats
path: root/udev/85-usbmuxd.rules.in
diff options
context:
space:
mode:
authorGravatar Bastien Nocera2009-08-15 14:55:14 +0200
committerGravatar Nikias Bassen2009-08-15 14:55:14 +0200
commit79ca4d9a3c3a82bb5a3f9be1ac7a2533c7a89b05 (patch)
treead45a1a342374b17dbd38524410a0959b269f310 /udev/85-usbmuxd.rules.in
parentf44dcbc5ec73baa3652627fc4b7a38875b2d496b (diff)
downloadusbmuxd-79ca4d9a3c3a82bb5a3f9be1ac7a2533c7a89b05.tar.gz
usbmuxd-79ca4d9a3c3a82bb5a3f9be1ac7a2533c7a89b05.tar.bz2
Port udev rules to newer kernels
Remove use of usb_endpoint, it's gone in newer kernels. Signed-off-by: Nikias Bassen <nikias@gmx.li>
Diffstat (limited to 'udev/85-usbmuxd.rules.in')
-rw-r--r--udev/85-usbmuxd.rules.in24
1 files changed, 4 insertions, 20 deletions
diff --git a/udev/85-usbmuxd.rules.in b/udev/85-usbmuxd.rules.in
index 82221d4..c0a3900 100644
--- a/udev/85-usbmuxd.rules.in
+++ b/udev/85-usbmuxd.rules.in
@@ -1,23 +1,7 @@
# usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd)
-# Skip anything non Apple
-ACTION=="add|remove", SUBSYSTEM!="usb|usb_endpoint", ATTRS{idVendor}!="05ac", GOTO="usbmuxd_rules_end"
+# Forces iPhone 1.0, 3G, 3GS and iPodTouch 1 and 2 to USB configuration 3 and run usbmuxd
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-4]", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@prefix@/sbin/usbmuxd -u"
-# Forces iPhone 1.0, 3G, 3GS and iPodTouch 1 and 2 to USB configuration 3
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="1290|1291|1292|1293|1294", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", GOTO="usbmuxd_rules_end"
-
-LABEL="usbmuxd_rules_usbmux"
-
-# Only apply to usb endpoints
-ACTION=="add|remove", SUBSYSTEM!="usb_endpoint", GOTO="usbmuxd_rules_end"
-
-# Setup cute names for the endpoints
-ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep04", IMPORT{program}="usb_id %p --export", SYMLINK+="usbmux/$env{ID_SERIAL_SHORT}/%s{direction}"
-ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", IMPORT{program}="usb_id %p --export", SYMLINK+="usbmux/$env{ID_SERIAL_SHORT}/%s{direction}"
-
-# Start and stop 'usbmuxd' as required
-ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="@prefix@/sbin/usbmuxd -u"
-ACTION=="remove", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="@prefix@/sbin/usbmuxd -x"
-
-# skip
-LABEL="usbmuxd_rules_end"
+# Exit usbmuxd when the last phone is removed
+ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="05ac", ENV{ID_MODEL_ID}=="129[0-4]", RUN+="@prefix@/sbin/usbmuxd -x"