summaryrefslogtreecommitdiffstats
path: root/udev
diff options
context:
space:
mode:
authorGravatar Bastien Nocera2018-04-18 18:44:23 +0200
committerGravatar Nikias Bassen2018-04-18 18:44:23 +0200
commitb95a0a014d48e3d4169d2f9885fcd0863abd57c1 (patch)
tree6913a3802763b8c8f433d9b7cd538134e4a20907 /udev
parent13dd964026558f85f38caae848635b6931b42bc1 (diff)
downloadusbmuxd-b95a0a014d48e3d4169d2f9885fcd0863abd57c1.tar.gz
usbmuxd-b95a0a014d48e3d4169d2f9885fcd0863abd57c1.tar.bz2
udev: Work around systemd bug related to bind events on Linux 4.12+
Make sure that udev doesn't lose our properties when bind events come in, as implemented in kernels 4.12+. See https://github.com/systemd/systemd/issues/8221 and https://github.com/systemd/systemd/issues/7109
Diffstat (limited to 'udev')
-rw-r--r--udev/39-usbmuxd.rules.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/udev/39-usbmuxd.rules.in b/udev/39-usbmuxd.rules.in
index 140869e..4e84755 100644
--- a/udev/39-usbmuxd.rules.in
+++ b/udev/39-usbmuxd.rules.in
@@ -6,5 +6,8 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/
# Initialize iOS devices into "deactivated" USB configuration state and activate usbmuxd
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@
+# Make sure properties don't get lost when bind action is called
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="bind", ENV{USBMUX_SUPPORTED}="1", OWNER="usbmux", @udev_activation_rule@
+
# Exit usbmuxd when the last device is removed
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ACTION=="remove", RUN+="@sbindir@/usbmuxd -x"