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-printer.service | |
download | aur-2b65dfcccbe6c91e9f5711da09b7f246a06e5c42.tar.gz |
initial commit
Diffstat (limited to 'usbgadget-func-printer.service')
-rw-r--r-- | usbgadget-func-printer.service | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usbgadget-func-printer.service b/usbgadget-func-printer.service new file mode 100644 index 000000000000..96fa4f74562c --- /dev/null +++ b/usbgadget-func-printer.service @@ -0,0 +1,18 @@ +[Unit] +Description=USB Gadget Printer +Before=gadget-start.service +After=modprobe@usbfunc:printer.service gadget-init.service +Wants=modprobe@usbfunc:printer.service +Requires=gadget-init.service +[Service] +Type=oneshot +RemainAfterExit=yes +SyslogIdentifier=gadget-func-printer +EnvironmentFile=/etc/default/gadget +WorkingDirectory=/sys/kernel/config/usb_gadget +ExecStart=/usr/bin/mkdir ${GADGET}/functions/printer.0 +ExecStart=/usr/bin/ln -s ${GADGET}/functions/printer.0 ${GADGET}/configs/a.1/ +ExecStop=/usr/bin/rm ${GADGET}/configs/a.1/printer.0 +ExecStop=/usr/bin/rmdir ${GADGET}/functions/printer.0 +[Install] +WantedBy=usb-gadget.target |