#!/bin/sh
exec tail -n +3 $0
# This is an utility for the nvram-wakeup package.  nvram-wakeup
# programs the alarm of the RTC (Real Time Clock, a clock in the
# motherboard) so that the system will power up at a certain hour.
# This menu method provides an easy way to halt the system at reboot,
# once.  This is needed by nvram-wakeup on certain motherboard, where,
# for the changes to take effect, you need to restart (not halt) the
# computer and wait until the BIOS runs (don't need to enter the BIOS
# setup).
menuentry "Halt once (for setting alarm)" {
  halt
}
if [ ${nvram_halt_once} ] ; then
  set nvram_halt_once=
  save_env nvram_halt_once
  set default="Halt once (for setting alarm)"
fi
