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:
# 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) 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.