Prev |  | Next

## 16. Everything works perfectly during the shutdown, and the UPS comes back on, but my system stays off. What’s happening?

Assuming you don’t have the problem in the next question, then you probably have an ATX motherboard, have APM or ACPI enabled in your kernel (assuming Linux here), and are reaching the halt at the bottom of your shutdown scripts.

Your machine obeys and shuts down, and stays down, since it remembers the last state when the UPS restarts.

One solution is to change your shutdown scripts so you never reach that point. You want the system to die without reaching the part where the kernel tells it to shut down. A possible script might look like this (see `scripts/systemd/nutshutdown` in NUT sources for a more streamlined and modern variant):

            # other shutdown stuff here (mount -o remount,ro ...)
            # `upsmon -K` if available on still mounted filesystems
            # at this point is more portable than the `test` below

            if (test -f /etc/killpower || /sbin/upsmon -K)
            then
                    /sbin/upsdrvctl shutdown

                    sleep 600       # this should never return

                    # uh oh, we never got shut down! (power race?)
                    reboot
            fi

            halt -p

The other solution is to change your BIOS setting to "always power on" instead of "last state", assuming that’s possible.

Prev |  | Next
| Home |