]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: fix hint with edit --global/--user
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 19 Feb 2017 22:41:38 +0000 (17:41 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 19 Feb 2017 22:42:18 +0000 (17:42 -0500)
src/systemctl/systemctl.c

index 90ff08538eadca8f4ac3a7f738c9f3223c8b774c..7ab5559b284fede0e1c1f5b10e8323399ea55218 100644 (file)
@@ -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;
                         }