From 577538f213cd7132c7450db393fd6fef6bb46b5a Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sat, 26 Jul 2014 17:08:41 +0200 Subject: Add systemd activation autofoo with fallback for udev and manual activation --- udev/39-usbmuxd.rules.in | 8 ++++---- udev/Makefile.am | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 udev/Makefile.am (limited to 'udev') diff --git a/udev/39-usbmuxd.rules.in b/udev/39-usbmuxd.rules.in index f4eb66f..91b14db 100644 --- a/udev/39-usbmuxd.rules.in +++ b/udev/39-usbmuxd.rules.in @@ -1,7 +1,7 @@ -# usbmuxd ("Apple Mobile Device" muxer listening on /var/run/usbmuxd) +# usbmuxd (Apple Mobile Device Muxer listening on /var/run/usbmuxd) -# Initialize iOS devices into "deactivated" USB configuration state and run usbmuxd -ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux", RUN+="@prefix@/sbin/usbmuxd -u -U usbmux" +# Initialize iOS devices into "deactivated" USB configuration state and activate usbmuxd +ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux", @udev_activation_rule@ # Exit usbmuxd when the last device is removed -ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@prefix@/sbin/usbmuxd -x" +ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@sbindir@/usbmuxd -x" diff --git a/udev/Makefile.am b/udev/Makefile.am new file mode 100644 index 0000000..95f565d --- /dev/null +++ b/udev/Makefile.am @@ -0,0 +1,20 @@ +edit = \ + $(SED) -r \ + -e 's|@udev_activation_rule[@]|$(udev_activation_rule)|g' \ + -e 's|@sbindir[@]|$(sbindir)|g' \ + < $< > $@ || rm $@ + +udevrules_DATA = \ + 39-usbmuxd.rules + +39-usbmuxd.rules: 39-usbmuxd.rules.in + $(edit) + +EXTRA_DIST = \ + 39-usbmuxd.rules.in + +MAINTAINERCLEANFILES = \ + 39-usbmuxd.rules + +CLEANFILES = \ + 39-usbmuxd.rules -- cgit v1.1-32-gdbae