chiark / gitweb /
systemctl: don't fail if first argument to shutdown isn't 'now' just warn loudly.
[elogind.git] / src / systemctl.c
index 68e4a909eb6e4b8cc586ba6661ca30277f68af0e..444ddf370c4ead051985dfab198f7b9ae5675ed9 100644 (file)
@@ -1465,7 +1465,7 @@ static int halt_help(void) {
 
 static int shutdown_help(void) {
 
-        printf("%s [options] [IGNORED] [WALL...]\n\n"
+        printf("%s [options] [now] [WALL...]\n\n"
                "Shut down the system.\n\n"
                "     --help      Show this help\n"
                "  -H --halt      Halt the machine\n"
@@ -1741,6 +1741,9 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
                 }
         }
 
+        if (argc > optind && !streq(argv[optind], "now"))
+                log_warning("First argument '%s' isn't 'now'. Ignoring.", argv[optind]);
+
         /* We ignore the time argument */
         if (argc > optind + 1)
                 arg_wall = argv + optind + 1;