I'm testing rtcwake having it turn off the machine then back on in 60 second using :
It calls shutdown, but apparently it needs different options than what rtcwake used because it returns with an error about the flags. I've played around with the shutdown command and the correct shutdown command is "shutdown -hP 0" (in 0 seconds shutdown then halt/power-off). If I just type "shutdown" I'll get a similar text from shutdown saying the arguments aren't correct.
Code
root@OpenMediaVault:~# rtcwake -m off -s 60
rtcwake: wakeup from "off" using /dev/rtc0 at Thu Dec 17 07:15:13 2015
shutdown: -H and -P flags can only be used along with -h flag.
Usage: shutdown [-akrhPHfFnc] [-t sec] time [warning message]
-a: use /etc/shutdown.allow
-k: don't really shutdown, only warn.
-r: reboot after shutdown.
-h: halt after shutdown.
-P: halt action is to turn off power.
-H: halt action is to just halt.
-f: do a 'fast' reboot (skip fsck).
-F: Force fsck on reboot.
-n: do not go through "init" but go down real fast.
-c: cancel a running shutdown.
-t secs: delay between warning and kill signal.
** the "time" argument is mandatory! (try "now") **
Alles anzeigen
I installed Debian 7.9.0 then OMV on-top of that install. I can think of a couple of ways around the issue, but I'm perplexed why rtcwake would call shutdown in a way that doesn't work.
Ideas? Thanks in advance!