diff options
author | Andrzej Pietrasiewicz <andrzej.p@collabora.com> | 2019-01-29 11:13:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-02-15 18:16:27 +0100 |
commit | 2c633a821eb81b1ce7fcca5e23bbbe41f44be77f (patch) | |
tree | 09fc207e3fa99e5d2ad10cdfc875dbe5158ddfd4 /rules | |
parent | 791cd1599311d2cfffec9cc7d2915b36cbd3047d (diff) | |
download | systemd-2c633a821eb81b1ce7fcca5e23bbbe41f44be77f.tar.gz |
units: add usb-gadget target
Linux can be run on a device meant to act as a USB peripheral. In order
for a machine to act as such a USB device it has to be equipped with
a UDC - USB Device Controller.
This patch adds a target reached when UDC becomes available. It can be used
for activating e.g. a service unit which composes a USB gadget with
configfs and activates it.
Diffstat (limited to 'rules')
-rw-r--r-- | rules/99-systemd.rules.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in index 419ca4ed87..f982631766 100644 --- a/rules/99-systemd.rules.in +++ b/rules/99-systemd.rules.in @@ -56,6 +56,8 @@ SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" +SUBSYSTEM=="udc", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="usb-gadget.target" + # Apply sysctl variables to network devices (and only to those) as they appear. ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name" |