Provide -h flag when calling shutdown (8) from rtcwake.
PATCH 1/1 Provide -h flag when calling shutdown (8) from rtcwake.
Otherwise, when calling rtcwake -m off you get:
"shutdown: -H and -P flags can only be used along with -h flag." accompanied by the shutdown usage, instead of a halt.
Signed-off-by Ángel González <[email protected]>
--- sys-utils/rtcwake.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sys-utils/rtcwake.c +2 -1
@@ -561,13 +561,14 @@ int main(int argc, char **argv) dryrun =1 ;/* to skip disabling alarm at the end */ }else if (strcmp (suspend,"off" ) ==0 ) { -char *arg[4 ]; +char *arg[5 ];int i =0 ;if (verbose)printf (_ ("suspend mode: off; executing %s\n" ), _PATH_SHUTDOWN); arg[i++] = _PATH_SHUTDOWN; + arg[i++] ="-h" ; arg[i++] ="-P" ; arg[i++] ="now" ; arg[i] =NULL ;
Signature · 1 line
1.7.11.5