I want to have a Mac Mini automatically boot when power is applied, as I cannot conveniently reach its power button, because it resides inside an art installation, where the power will be shut down during the night. I thought it might be possible to use the "Start up automatically after a power failure" in the energy system settings for this, along with the
-u parameter to the
shutdown command, in order to safely bring the machine in a state where I don't have to fear data loss. According to the
shutdown man page, the
-u parameter seems to be what I need:
-u: The system is halted up until the point of removing system power, but waits before removing power for 5 minutes so that an external UPS (uninterruptible power supply) can forcibly remove power. This simulates a dirty shutdown to permit a later automatic power on. OS X uses this mode automatically with supported UPSs in emergency shutdowns.
shutdown -hu now does not work. On both Macs I tested it with (Mac Mini with 10.10 and a Mac Pro on 10.11), the machines still power off immediately, they do not wait for five minutes in the halt state, so that I don't have the time to power off the mains. Therefore, the autostart on power failure setting doesn't trigger, and I have to manually push the power button to make them boot again.