summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2022-01-10 12:35:46 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-01-12 22:11:22 +0100
commit19fbd7764da2e23a89e27b4d95afd77b99f4be87 (patch)
treefe82417a519e6a14cfe39880cca7ba51c609edbb
parent704d859eeb20fea27cec10c7c6cdb47c59413138 (diff)
downloadsystemd-19fbd7764da2e23a89e27b4d95afd77b99f4be87.tar.gz
xdg-autostart-service: Ignore missing desktop-sepcific condition binary
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. (cherry picked from commit 6d0aef1dd15088e7379681b3bd93c3cb450f3c55)
-rw-r--r--src/xdg-autostart-generator/xdg-autostart-service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xdg-autostart-generator/xdg-autostart-service.c b/src/xdg-autostart-generator/xdg-autostart-service.c
index 241a5b3cfd..c60a9d81ac 100644
--- a/src/xdg-autostart-generator/xdg-autostart-service.c
+++ b/src/xdg-autostart-generator/xdg-autostart-service.c
@@ -485,7 +485,7 @@ static int xdg_autostart_generate_desktop_condition(
log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, r,
"%s not found: %m", test_binary);
fprintf(f, "# ExecCondition using %s skipped due to missing binary.\n", test_binary);
- return r;
+ return 0;
}
e_autostart_condition = cescape(condition);