chiark / gitweb /
systemctl: print wall message only if successful
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Feb 2013 19:08:09 +0000 (14:08 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Feb 2013 20:26:34 +0000 (15:26 -0500)
systemctl would write to the wall even if unsuccessful.

https://bugs.freedesktop.org/show_bug.cgi?id=60393

src/systemctl/systemctl.c

index 70fd155..4c91a18 100644 (file)
@@ -1841,7 +1841,7 @@ static int start_special(DBusConnection *bus, char **args) {
         }
 
         r = start_unit(bus, args);
-        if (r >= 0)
+        if (r == EXIT_SUCCESS)
                 warn_wall(a);
 
         return r;