]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
rtcwake: pass -h to shutdown
authorMike Frysinger <vapier@gentoo.org>
Wed, 24 Apr 2013 03:23:21 +0000 (23:23 -0400)
committerKarel Zak <kzak@redhat.com>
Thu, 25 Apr 2013 07:23:40 +0000 (09:23 +0200)
The sysvinit shutdown requires you use -h when using -H or -P.
Other inits just don't seem to care.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
sys-utils/rtcwake.c

index f2efc8728f96ffa2230d1628bd1afe1827fc22ef..eedf78d0c0c9ca84e9154d56176a568cdfab8b8c 100644 (file)
@@ -569,13 +569,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;