summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-04-03 08:38:33 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2017-04-03 08:38:37 +0200
commit4d8b0f0f7aeadc401ac02f67576ccb1de8cf79e6 (patch)
treec0805e4d10ad7aa3186a52fcbea6048689084756 /src
parentMerge pull request #5589 from jasonreeder/claimed_address_fix (diff)
downloadsystemd-4d8b0f0f7aeadc401ac02f67576ccb1de8cf79e6.tar.xz
systemd-4d8b0f0f7aeadc401ac02f67576ccb1de8cf79e6.zip
core: downgrade error message if command is prefixed with `-` and the command is not found
Fixes #5621
Diffstat (limited to 'src')
-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,