]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xdg-autostart-service: Ignore missing desktop-sepcific condition binary
authorBenjamin Berg <bberg@redhat.com>
Mon, 10 Jan 2022 11:35:46 +0000 (12:35 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 12 Jan 2022 15:11:09 +0000 (16:11 +0100)
If a desktop specific ExecCondition= binary does not exist, this just
means that the desktop environment is not available. As such, it is not
an error condition that should prevent the service from being installed
in the .wants target.

Fix this by simply returning zero.

src/xdg-autostart-generator/xdg-autostart-service.c

index 32a4958aedcd9544af3a0c47d122c536ca11b58f..d450341b9f164b82e1c43a8f2b69f81f72ab6705 100644 (file)
@@ -487,7 +487,7 @@ static int xdg_autostart_generate_desktop_condition(
                                        "%s: ExecCondition executable %s not found, unit will not be started automatically: %m",
                                        service->path, test_binary);
                         fprintf(f, "# ExecCondition using %s skipped due to missing binary.\n", test_binary);
-                        return r;
+                        return 0;
                 }
 
                 e_autostart_condition = cescape(condition);