mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-04 00:57:14 +08:00
10 lines
982 B
Plaintext
10 lines
982 B
Plaintext
# usbmuxd ("Apple Mobile Device" muxer listening on /var/run/usbmuxd)
|
|
|
|
# Forces iDevices to the last USB configuration and runs usbmuxd
|
|
TEST=="/sys/fs/cgroup/systemd", ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", TAG+="systemd", ENV{SYSTEMD_WANTS}="usbmuxd.service", GOTO="usbmuxd_systemd_end"
|
|
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", RUN+="/usr/sbin/usbmuxd -u -U usbmux"
|
|
LABEL="usbmuxd_systemd_end"
|
|
|
|
# Exit usbmuxd when the last device is removed
|
|
ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="/usr/sbin/usbmuxd -x"
|