summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-05 10:16:50 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-05 10:16:50 -0500
commit0ca49eed1f7624f77a95fa0b419a0855d1ea7381 (patch)
tree47645e2d30e146d298e3e0b599e3457c6e603ad1 /src/systemctl
parent9f0cd100d0dbc7c9b55e99bacb4034402a60b389 (diff)
parent0b8505b7c9b1d90a29013091bcce23540ae1c92c (diff)
Merge pull request #2801 from ronnychevalier/rc/systemctl_error_msg
systemctl: improve error message when starting a unit failed
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index a62f4bf2f5..19d4e2c6e5 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2596,7 +2596,10 @@ static int start_unit_one(
if (!sd_bus_error_has_name(error, BUS_ERROR_NO_SUCH_UNIT) &&
!sd_bus_error_has_name(error, BUS_ERROR_UNIT_MASKED))
- log_error("See system logs and 'systemctl status %s' for details.", name);
+ log_error("See %s logs and 'systemctl%s status %s' for details.",
+ arg_scope == UNIT_FILE_SYSTEM ? "system" : "user",
+ arg_scope == UNIT_FILE_SYSTEM ? "" : " --user",
+ name);
return r;
}