aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdg-autostart-generator/xdg-autostart-service.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-11-07 17:50:51 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2023-11-07 20:47:04 +0000
commited739145fba45d10d884661422d8779f88032749 (patch)
tree4ad4ec8fae6ea3e870556254cd79afde0925e7ff /src/xdg-autostart-generator/xdg-autostart-service.c
parentMerge pull request #29909 from keszybz/documentation-cleanup (diff)
downloadsystemd-ed739145fba45d10d884661422d8779f88032749.tar.xz
systemd-ed739145fba45d10d884661422d8779f88032749.zip
xdg-autostart: downgrade warning for missing executables
On a system with a shared home directory, I'm getting a bunch of warnings: systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.signal.Signal.desktop: not generating unit, error parsing Exec= line: No such file or directory systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/im.riot.Riot.desktop: not generating unit, error parsing Exec= line: No such file or directory systemd-xdg-autostart-generator[76]: Exec binary '/usr/libexec/gnome-tweak-tool-lid-inhibitor' does not exist: No such file or directory systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/ignore-lid-switch-tweak.desktop: not generating unit, error parsing Exec= line: No such file or directory systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop: not generating unit, error parsing Exec= line: No such file or directory This isn't really a problem. Let's just print an info message.
Diffstat (limited to 'src/xdg-autostart-generator/xdg-autostart-service.c')
-rw-r--r--src/xdg-autostart-generator/xdg-autostart-service.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xdg-autostart-generator/xdg-autostart-service.c b/src/xdg-autostart-generator/xdg-autostart-service.c
index 90321b892fa..480d1009c3e 100644
--- a/src/xdg-autostart-generator/xdg-autostart-service.c
+++ b/src/xdg-autostart-generator/xdg-autostart-service.c
@@ -572,7 +572,10 @@ int xdg_autostart_service_generate_unit(
r = xdg_autostart_format_exec_start(service->exec_string, &exec_start);
if (r < 0) {
- log_warning_errno(r, "%s: not generating unit, error parsing Exec= line: %m", service->path);
+ log_full_errno(r == -ENOENT ? LOG_INFO : LOG_WARNING, r,
+ r == -ENOENT ? "%s: not generating unit, executable specified in Exec= does not exist."
+ : "%s: not generating unit, error parsing Exec= line: %m",
+ service->path);
return 0;
}