]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: rework message suggesting how to create a new unit file
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Nov 2018 16:10:47 +0000 (17:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 29 Nov 2018 10:25:32 +0000 (11:25 +0100)
We need to specifiy --full for creating full unit files.

Also, this is an explanatory hint, hence shouldn't be logged on LOG_ERR
level.

src/systemctl/systemctl.c

index e7cf33ec52216f1377b7c1fed97c6512540b48f0..0fcf5977677792a2b0d820a8cc3d98a6ec87214a 100644 (file)
@@ -6952,10 +6952,10 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
                         assert(!path);
 
                         if (!arg_force) {
-                                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);
+                                log_info("Run 'systemctl edit%s --force --full %s' to create a new unit.",
+                                         arg_scope == UNIT_FILE_GLOBAL ? " --global" :
+                                         arg_scope == UNIT_FILE_USER ? " --user" : "",
+                                         *name);
                                 return -ENOENT;
                         }