libusbgx: usbgx.service: use Type=oneshot

A regression was introduced by commit:
```
commit 48bc4b2d5e
Author: Ming Liu <liu.ming50@gmail.com>
Date:   Tue May 9 13:36:20 2023 +0200

    libusbgx: fix some systemd service conditions

    Let usbgx.service require and run after sys-kernel-config.mount.

    Use "Type=simple" rather than "Type=oneshot", this ensures
    usbgx.service would not hang on failures, failures could happen in
    many conditions, like if the end user has manually configured
    something in configfs, or start usbgx.service twice, or someting
    wrong in /etc/default/usbgx or /etc/usbgx/*.schema.

    Signed-off-by: Ming Liu <liu.ming50@gmail.com>
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
```

In the case when 'Type=simple' is set, 'ExecStartPost=' will execute
right after the process in 'ExecStart=' is started, but we need it
execute after the last 'ExecStart=' process exited successfully, so
change back to "Type=oneshot".

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Ming Liu 2023-08-14 10:41:03 +02:00 committed by Khem Raj
parent e89194c3aa
commit e84dbcc381

View File

@ -4,7 +4,7 @@ Requires=sys-kernel-config.mount
After=sys-kernel-config.mount
[Service]
Type=simple
Type=oneshot
ExecStart=/usr/bin/gadget-start
[Install]