From 4d8b0f0f7aeadc401ac02f67576ccb1de8cf79e6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 3 Apr 2017 15:38:33 +0900 Subject: [PATCH] core: downgrade error message if command is prefixed with `-` and the command is not found Fixes #5621 --- src/core/execute.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/execute.c b/src/core/execute.c index d7798387c52..6e7c76e4ff0 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -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, -- 2.47.3