-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add systemd activation autofoo with fallback for udev and manual acti…
…vation
- Loading branch information
Showing
7 changed files
with
136 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,5 @@ py-compile | |
stamp-h1 | ||
src/.libs | ||
src/usbmuxd | ||
udev/85-usbmuxd.rules | ||
udev/39-usbmuxd.rules | ||
systemd/usbmuxd.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
AUTOMAKE_OPTIONS = foreign | ||
ACLOCAL_AMFLAGS = -I m4 | ||
SUBDIRS = src | ||
SUBDIRS = src $(UDEV_SUB) $(SYSTEMD_SUB) | ||
|
||
udevrulesdir = /lib/udev/rules.d | ||
udevrules_DATA = udev/39-usbmuxd.rules | ||
DISTCHECK_CONFIGURE_FLAGS = \ | ||
--with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \ | ||
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
edit = \ | ||
$(SED) -r \ | ||
-e 's|@sbindir[@]|$(sbindir)|g' \ | ||
-e 's|@localstatedir[@]|$(localstatedir)|g' \ | ||
< $< > $@ || rm $@ | ||
|
||
if HAVE_SYSTEMD | ||
|
||
systemdsystemunit_DATA = \ | ||
usbmuxd.service | ||
|
||
usbmuxd.service: usbmuxd.service.in | ||
$(edit) | ||
|
||
EXTRA_DIST = \ | ||
usbmuxd.service.in | ||
|
||
CLEANFILES = \ | ||
usbmuxd.service | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[Unit] | ||
Description=Socket daemon for the usbmux protocol used by Apple devices | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=@sbindir@/usbmuxd -u -U usbmux -f | ||
PIDFile=@localstatedir@/run/usbmuxd.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |