diff options
author | BigfootACA | 2022-05-19 11:28:06 +0800 |
---|---|---|
committer | BigfootACA | 2022-05-19 11:28:06 +0800 |
commit | 2b65dfcccbe6c91e9f5711da09b7f246a06e5c42 (patch) | |
tree | 0c11399d7ff7f34a17e0204320e7f43d31469453 /usbgadget-func-acm.service | |
download | aur-systemd-gadget.tar.gz |
initial commit
Diffstat (limited to 'usbgadget-func-acm.service')
-rw-r--r-- | usbgadget-func-acm.service | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usbgadget-func-acm.service b/usbgadget-func-acm.service new file mode 100644 index 000000000000..ed1654d604f7 --- /dev/null +++ b/usbgadget-func-acm.service @@ -0,0 +1,18 @@ +[Unit] +Description=USB Gadget ACM Serial Console +Before=gadget-start.service +After=modprobe@usbfunc:acm.service gadget-init.service +Wants=modprobe@usbfunc:acm.service +Requires=gadget-init.service +[Service] +Type=oneshot +RemainAfterExit=yes +SyslogIdentifier=gadget-func-acm +EnvironmentFile=/etc/default/gadget +WorkingDirectory=/sys/kernel/config/usb_gadget +ExecStart=/usr/bin/mkdir ${GADGET}/functions/acm.0 +ExecStart=/usr/bin/ln -s ${GADGET}/functions/acm.0 ${GADGET}/configs/a.1/ +ExecStop=/usr/bin/rm ${GADGET}/configs/a.1/acm.0 +ExecStop=/usr/bin/rmdir ${GADGET}/functions/acm.0 +[Install] +WantedBy=usb-gadget.target |