Package: nut-client Version: 2.7.1-1 Hello,
nut-client's current systemd unit for upsmon is missing the init.d script's check for the unconfigured "MODE=none" in /etc/nut/nut.conf. This leads to a failed unit: | Apr 27 10:41:43 laptop upsmon[2856]: Fatal error: insufficient power configured! | Apr 27 10:41:43 laptop upsmon[2856]: Sum of power values........: 0 | Apr 27 10:41:43 laptop upsmon[2856]: Minimum value (MINSUPPLIES): 1 | Apr 27 10:41:43 laptop upsmon[2856]: Edit your upsmon.conf and change the values. | Apr 27 10:41:43 laptop systemd[1]: nut-monitor.service: control process exited, code=exited status=1 | Apr 27 10:41:43 laptop systemd[1]: Failed to start Network UPS Tools - power device monitor and shutdown controller. | -- Subject: Unit nut-monitor.service has failed Unfortunately due to that the package installation also fails as the autogenerated postinsts assume invoke-rc.d to succeed. In other words, a clean install of nut-client under systemd fails. I see the following options: * Somehow add that startup condition to the .service. There is no "ConditionCommand" or similar which could hold that though, and putting the test into ExecStartPre= or similar wouldn't work either. So it would need to be something which doesn't cause the unit to fail (due to non-running daemon or non-zero exit). * In the postinst, only enable the unit if the service is configured, otherwise leave it as disabled; and add instructions how to enable it (with update-rc.d?) to nut.conf. * Drop the systemd unit entirely and continue using the init.d script for the time being (that's what I just did to the Ubuntu package for simplicity, for the record). Thanks, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
signature.asc
Description: Digital signature