summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2017-04-12 20:22:03 +0200
committerGitHub <noreply@github.com>2017-04-12 20:22:03 +0200
commit67d293da1111e3550f822d0d142a5392755b616f (patch)
treef185be5fc8c5154306252b410e1860d1b10c7357 /src/core
parentb8e485faf1b75aeea53fb38ec5c0a157a257e719 (diff)
parent4d8b0f0f7aeadc401ac02f67576ccb1de8cf79e6 (diff)
Merge pull request #5690 from yuwata/fix-5621
core: downgrade error message if command is prefixed with `-` and theā€¦
Diffstat (limited to 'src/core')
-rw-r--r--src/core/execute.c8
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,