summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-19 23:41:38 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-19 23:42:18 +0100
commit0dcabf0968ce00fd1295e3f501c9abd0f8d0ed9c (patch)
tree42d79fe593e236bdd5ada94937d1c624d6320d72 /src/systemctl/systemctl.c
parentsystemctl: fix editing of units with no fragment (diff)
downloadsystemd-0dcabf0968ce00fd1295e3f501c9abd0f8d0ed9c.tar.xz
systemd-0dcabf0968ce00fd1295e3f501c9abd0f8d0ed9c.zip
systemctl: fix hint with edit --global/--user
Diffstat (limited to '')
-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 90ff08538e..7ab5559b28 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -6817,7 +6817,10 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
assert(!path);
if (!arg_force) {
- log_error("Run 'systemctl edit --force %s' to create a new unit.", *name);
+ log_error("Run 'systemctl edit%s --force %s' to create a new unit.",
+ arg_scope == UNIT_FILE_GLOBAL ? " --global" :
+ arg_scope == UNIT_FILE_USER ? " --user" : "",
+ *name);
return -ENOENT;
}