chiark / gitweb /
hostnamectl: do not choke on set-hostname with no argument
authorKay Sievers <kay@vrfy.org>
Mon, 29 Oct 2012 19:54:26 +0000 (20:54 +0100)
committerKay Sievers <kay@vrfy.org>
Mon, 29 Oct 2012 19:56:02 +0000 (20:56 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=871172

src/hostname/hostnamectl.c

index 1d448bd..e7b2b49 100644 (file)
@@ -430,7 +430,7 @@ static int hostnamectl_main(DBusConnection *bus, int argc, char *argv[], DBusErr
                 int (* const dispatch)(DBusConnection *bus, char **args, unsigned n);
         } verbs[] = {
                 { "status",              LESS,   1, show_status         },
-                { "set-hostname",        LESS,   2, set_hostname        },
+                { "set-hostname",        EQUAL,  2, set_hostname        },
                 { "set-icon-name",       EQUAL,  2, set_icon_name       },
         };