chiark / gitweb /
shutdown: if now time argument is passed, imply +1 not +0
[elogind.git] / src / systemctl.c
index e517031ceac0d5af15d65e5838e119014888c776..2b34798d060b35fb3e4531bb9ffcabe32076dbc5 100644 (file)
@@ -4233,11 +4233,13 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
                 }
         }
 
-        if (argc > optind)
+        if (argc > optind) {
                 if ((r = parse_time_spec(argv[optind], &arg_when)) < 0) {
                         log_error("Failed to parse time specification: %s", argv[optind]);
                         return r;
                 }
+        } else
+                arg_when = USEC_PER_MINUTE;
 
         /* We skip the time argument */
         if (argc > optind + 1)