From b95a0a014d48e3d4169d2f9885fcd0863abd57c1 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 18 Apr 2018 18:44:23 +0200 Subject: 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 --- udev/39-usbmuxd.rules.in | 3 +++ 1 file changed, 3 insertions(+) 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" -- cgit v1.1-32-gdbae