Skip to content

Setting non-root device node permissions causes nut-driver.service to fail to start #299

@hexadecagram

Description

@hexadecagram

Hello,

ArchLinux user here.

If I use udev to set a user/group on the device node for my UPS, nut-driver.service doesn't start up on boot. If I then login and restart nut-driver.service, it works.

The systemd functionality described in this blog supposedly worked at one time (I never tried it myself).

After much trial and error, I set After=network-online.target and Requires=network-online.target for both nut-driver.service and nut-server.service (the latter of which should have those configurations regardless, because upsd will fail to start if the network is not online). Boom, it works. I tried quite a few unit files before that, all the way up the chain to upower.service. Nothing else worked.

I think a more appropriate fix would be to add something like the following in nut-driver.service (which also works). This will work for now but I think the ideal solution would to be to remove the nut-driver.service dependency in nut-server.service and work it into udev so that drivers are reloaded when devices are hotplugged.

[Service]
Restart=on-failure
RestartSec=10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions