[systemd-commits] man/shutdown.xml src/shutdownd.c src/systemctl.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon Aug 16 08:13:12 PDT 2010


 man/shutdown.xml |    2 +-
 src/shutdownd.c  |    2 +-
 src/systemctl.c  |    4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 6b5ad000aba61a5312b5c3fac7dd85a0d33816af
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Aug 16 17:12:35 2010 +0200

    shutdown: if now time argument is passed, imply +1 not +0
    
    That should friendlier for folks who just run "shutdown" to figure out
    the command line arguments...
    
    https://bugzilla.redhat.com/show_bug.cgi?id=624149

diff --git a/man/shutdown.xml b/man/shutdown.xml
index 9588492..c48e141 100644
--- a/man/shutdown.xml
+++ b/man/shutdown.xml
@@ -72,7 +72,7 @@
                 number of minutes m from now. <literal>now</literal>
                 is an alias for <literal>+0</literal>, i.e. for
                 triggering an immediate shutdown. If no time argument
-                is specified, <literal>now</literal> is
+                is specified, <literal>+1</literal> is
                 implied.</para>
 
                 <para>Note that to specify a wall message you must
diff --git a/src/shutdownd.c b/src/shutdownd.c
index 241c432..751a1a5 100644
--- a/src/shutdownd.c
+++ b/src/shutdownd.c
@@ -88,7 +88,7 @@ static int read_packet(int fd, struct shutdownd_command *_c) {
         }
 
         if (n != sizeof(c)) {
-                log_warning("Message has invaliud size. Ignoring");
+                log_warning("Message has invalid size. Ignoring");
                 return 0;
         }
 
diff --git a/src/systemctl.c b/src/systemctl.c
index e517031..2b34798 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -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)


More information about the systemd-commits mailing list