]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: downgrade error message if command is prefixed with `-` and the command is... 5690/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Apr 2017 06:38:33 +0000 (15:38 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Apr 2017 06:38:37 +0000 (15:38 +0900)
Fixes #5621

src/core/execute.c

index d7798387c52cb51e2da67579257af045e1860fd9..6e7c76e4ff07a56dc8d0b40230d594fceb5db01e 100644 (file)
@@ -2989,6 +2989,14 @@ int exec_spawn(Unit *unit,
                                                                   error_message),
                                                  "EXECUTABLE=%s", command->path,
                                                  NULL);
+                        else if (r == -ENOENT && command->ignore)
+                                log_struct_errno(LOG_INFO, r,
+                                                 "MESSAGE_ID=" SD_MESSAGE_SPAWN_FAILED_STR,
+                                                 LOG_UNIT_ID(unit),
+                                                 LOG_UNIT_MESSAGE(unit, "Skipped spawning %s: %m",
+                                                                  command->path),
+                                                 "EXECUTABLE=%s", command->path,
+                                                 NULL);
                         else
                                 log_struct_errno(LOG_ERR, r,
                                                  "MESSAGE_ID=" SD_MESSAGE_SPAWN_FAILED_STR,