diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-04-03 15:38:33 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-04-03 15:38:37 +0900 |
commit | 4d8b0f0f7aeadc401ac02f67576ccb1de8cf79e6 (patch) | |
tree | c0805e4d10ad7aa3186a52fcbea6048689084756 /src/core/execute.c | |
parent | 88be0aa2263cff089806efa5fc92bb5c9b747610 (diff) |
core: downgrade error message if command is prefixed with `-` and the command is not found
Fixes #5621
Diffstat (limited to 'src/core/execute.c')
-rw-r--r-- | src/core/execute.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index d7798387c5..6e7c76e4ff 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, |