[Nut-upsuser] UPS/NUT with openSUSE 13.1
Roger Price
roger at rogerprice.org
Thu Sep 3 15:18:01 UTC 2015
On Thu, 3 Sep 2015, Rob Groner wrote:
> I’ve followed your excellent guide for setting up NUT in openSUSE 13.1.
> I’ve had great luck IN THE PAST, but for some reason now that I am
> trying to set it up again from scratch, I’m getting a weird error.
>
> Everything works except for the UPS shutdown. I put the script in
> /usr/lib/system/system-shutdown and made it executable. In fact, if I
> execute it manually...it will shut down the UPS (and then bring it back
> up). However, if I shut down normally, either the script does not
> execute, or the UPS simply fails to receive it. In a previous system
> when I did this, it worked perfectly (almost too well, as I’d sometimes
> forget when simply rebooting the system that it had commanded the UPS to
> shutdown 20 seconds later…). Do you have any suggestions as to why the
> script works fine when I execute it manually, but doesn’t work when the
> system actually shuts down?
Hello Bob, I'll reply via the NUT mailing list since others may be
interested, and the list will archive the discussion.
Putting the shutdown script in /usr/lib/system/system-shutdown so that
systemd will execute it as late as possible makes it difficult to debug
what happens, or doesn't happen, since when the script is executed, it is
no longer possible to write out any trace statements.
So I suggest that temporarily you use the systemd service unit approach
which will place a record in /var/log/messages. This is easier to debug.
Once you have found out why the required shutdown has not happened, you
can test the fix, and when it works go back to using a script in
/usr/lib/system/system-shutdown
Don't forget that you will have to initialize the service unit with a
command such as
systemctl --system reenable /etc/systemd/system/ups-delayed-shutdown.service
Best Regards,
Roger
More information about the Nut-upsuser
mailing list