On Sun, 24 May 2020 17:35:10 -0500 David Engel <da...@istwok.net> wrote:
> Dear Maintainer,
Hello David,
>
> I have two systems connected to a single UPS. The first system
> running both nut-server and nut-client packages works fine. The
> second system running only nut-client experiences this problem.
>
> Systemd can't sucessfully start the nut-monitor.service. The reason
> is that the /run/nut directory does not exist for upsmon to write its
> pid file. Even though upsmon starts and connects to the remote
> server, systemd eventually kills it becuase the pid file never gets
> written.
>
> The undesirable work around is to install the nut-server package so
> that something run by it creates /run/nut before upsmon is run. This
> also results in systemd attempting and failing to start the nut-driver
> service. The nut-server service is started but it benignly succeeds
> without starting upsd becaue MODE is set to netclient in
> /etc/nut/nut.conf. The nut-driver service failure causes systemd to
> that the system is in a degraded state because the unnecessary
> nut-driver.service failed to start.
>
> Ideally, upsmon should create the /run/nut directory if needed so the
> nut-server package doesn't not need to be installed. Alternatively,
> the nut-driver service should succeed benignly when not needed in the
> same way the nut-server service does.
This is quite weird, the package already contains a systemd tmpfiles
snippet (/usr/lib/tmpfiles.d/nut-client.conf) that should create the
directory during the boot.
Could you please give me the output of "systemctl list-dependencies
nut-monitor.service" and "systemctl list-dependencies --after
nut-monitor.service" ?
Kind regards,
Laurent Bigonville