On Thu, 1 Feb 2018, Lee Damon wrote:
I've "fixed" this problem by modifying the nutshutdown script:
# stop nut driver to free up access to the device
/sbin/systemctl stop nut-driver
# make sure it has time to die
# check to see if we need to actually shutdown the UPS then do it
/usr/sbin/upsmon -K >/dev/null 2>&1 && /usr/sbin/upsdrvctl shutdown
I don't have NUT + systemd + CentOS/RHEL, but I'm confused by your script.
"upsdrvctl" is a front end to your driver. You are sending a command via
upsdrvctl and via your driver _after_ you have stopped the driver? And it
How did/do you solve this problem?
I don't use the nutshutdown script, but rather a systemd service unit which is
called much earlier in the shutdown process. This allows logging of the action.
It's described in Appendix B.2 at
Nut-upsuser mailing list