summaryrefslogtreecommitdiffstats
path: root/udev
diff options
context:
space:
mode:
authorGravatar Rudolf Tammekivi2018-01-31 01:10:54 +0100
committerGravatar Nikias Bassen2018-01-31 01:10:54 +0100
commitb888970f68fb16961a7cc3a526065fab7a5d96ca (patch)
tree4913e5e12db4a1a7b35801bfb0b7541b7b0385c9 /udev
parent7f54d304149f405dc70ac924471df0d5e3e5ea09 (diff)
downloadusbmuxd-b888970f68fb16961a7cc3a526065fab7a5d96ca.tar.gz
usbmuxd-b888970f68fb16961a7cc3a526065fab7a5d96ca.tar.bz2
udev: Handle all events only once
This fixes spontaneous USB reconfiguration causing "remove" event to be sent to the daemon, which causes it to close itself if it did not have enough time to connect to phone.
Diffstat (limited to 'udev')
-rw-r--r--udev/39-usbmuxd.rules.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/udev/39-usbmuxd.rules.in b/udev/39-usbmuxd.rules.in
index 7d14d22..140869e 100644
--- a/udev/39-usbmuxd.rules.in
+++ b/udev/39-usbmuxd.rules.in
@@ -1,10 +1,10 @@
# usbmuxd (Apple Mobile Device Muxer listening on /var/run/usbmuxd)
# systemd should receive all events relating to device
-SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", TAG+="systemd"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", TAG+="systemd"
# Initialize iOS devices into "deactivated" USB configuration state and activate usbmuxd
-SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux", @udev_activation_rule@
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux", @udev_activation_rule@
# Exit usbmuxd when the last device is removed
-SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="remove", RUN+="@sbindir@/usbmuxd -x"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="remove", RUN+="@sbindir@/usbmuxd -x"