[systemd-devel] Requiring hardware device and escaping device names

Andrey Borzenkov arvidjaar at gmail.com
Tue Apr 1 00:26:18 PDT 2014


On Tue, Apr 1, 2014 at 6:45 AM, Kai Hendry <hendry at webconverger.com> wrote:
> On 31 March 2014 09:54, Kai Hendry <hendry at webconverger.com> wrote:
>> Not sure what to try next? If I start it manually `sudo systemctl
>> start shkd at -dev-input-event0.service`, it starts working again. Is
>> http://www.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutSec=
>> the right way to proceed? Not sure.
>
> RestartSec=5 did the trick! Not sure why systemd gives up trying to
> restart a process, despite Restart=always
> http://ix.io/bog
>

Using Bind on device name would be more logical. In this case systemd
would stop service when deviced disappeared and restart when it
appears again. This avoids permanent restart loop when device is not
present.

>
> Still don't understand where
>
> [hendry at alarmpi ~]$ systemctl status
> shkd at sys-devices-platform-bcm2708_usb-usb1-1\x2d1-1\x2d1.2-1\x2d1.2.2-1\x2d1.2.2:1.0-input-input1.service
> shkd at sys-devices-platform-bcm2708_usb-usb1-1x2d1-1x2d1.2-1x2d1.2.2-1x2d1.2.2:1.0-input-input1.service
> - Simple HotKey Daemon
>    Loaded: loaded (/etc/systemd/system/shkd at .service; disabled)
>    Active: inactive (dead)
>
> Comes from.
>


>From "systemctl status". As soon as unit is mentioned anywhere the
stub for it is internally created by systemd (it resolves actual unit
on-disk definition lazily). So your own command creates it :)


More information about the systemd-devel mailing list