]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: when reading legacy -t argument for shutdown, don't drop following parameter
authorLennart Poettering <lennart@poettering.net>
Tue, 29 Sep 2015 20:40:05 +0000 (22:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Sep 2015 10:23:33 +0000 (12:23 +0200)
We currently completely ignore the following parameter, but we really
should not, as that is actually the time to shut down on.

src/systemctl/systemctl.c

index 621c931c0ba508e88d7be9a90027b655358b8a9b..a965369c0c87bf16d9945158a07fd2e5cf6f6e4c 100644 (file)
@@ -7003,7 +7003,7 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "HPrhkKt:afFc", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "HPrhkKtafFc", options, NULL)) >= 0)
                 switch (c) {
 
                 case ARG_HELP:
@@ -7486,6 +7486,10 @@ static int logind_schedule_shutdown(void) {
         case ACTION_KEXEC:
                 action = "kexec";
                 break;
+        case ACTION_EXIT:
+                action = "exit";
+                break;
+        case ACTION_REBOOT:
         default:
                 action = "reboot";
                 break;