summaryrefslogtreecommitdiffstats
path: root/abs/extra/usbmuxd/39-usbmuxd.rules
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/usbmuxd/39-usbmuxd.rules')
-rw-r--r--abs/extra/usbmuxd/39-usbmuxd.rules9
1 files changed, 9 insertions, 0 deletions
diff --git a/abs/extra/usbmuxd/39-usbmuxd.rules b/abs/extra/usbmuxd/39-usbmuxd.rules
new file mode 100644
index 0000000..ec9f725
--- /dev/null
+++ b/abs/extra/usbmuxd/39-usbmuxd.rules
@@ -0,0 +1,9 @@
+# usbmuxd ("Apple Mobile Device" muxer listening on /var/run/usbmuxd)
+
+# Forces iDevices to the last USB configuration and runs usbmuxd
+TEST=="/sys/fs/cgroup/systemd", ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", TAG+="systemd", ENV{SYSTEMD_WANTS}="usbmuxd.service", GOTO="usbmuxd_systemd_end"
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", RUN+="/usr/sbin/usbmuxd -u -U usbmux"
+LABEL="usbmuxd_systemd_end"
+
+# Exit usbmuxd when the last device is removed
+ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="/usr/sbin/usbmuxd -x"