]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: start_unit() returns > 0 on error, let's catch that properly 12014/head
authorLennart Poettering <lennart@poettering.net>
Fri, 15 Mar 2019 14:05:01 +0000 (15:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Mar 2019 14:05:27 +0000 (15:05 +0100)
Let's make sure we fall back correctly to initctl when start_unit()
returns an error > 0.

Fixes: #11546
src/systemctl/systemctl.c

index caacfe06362d1cc4bffbd386b764fce6252b5272..58f0305433e9203ace47bf947a1be545dfbbe312 100644 (file)
@@ -8939,7 +8939,7 @@ static int reload_with_fallback(void) {
 
 static int start_with_fallback(void) {
         /* First, try systemd via D-Bus. */
-        if (start_unit(0, NULL, NULL) >= 0)
+        if (start_unit(0, NULL, NULL) == 0)
                 return 0;
 
         /* Nothing else worked, so let's try /dev/initctl */