]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/install: improve message about template mismatch
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 9 Jun 2021 15:24:52 +0000 (17:24 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 9 Jun 2021 19:39:33 +0000 (21:39 +0200)
$ systemctl enable --root=/ serial-getty@.service
Failed to enable unit, unit getty.target is a non-template unit.

Failed to enable serial-getty@.service, destination unit getty.target is a non-template unit.

src/shared/install.c

index 1cae42df6bde1bbb684097fa1274660ce894fc8b..c10c15b9ff80f6dfe7060cfdbcad3127b6ddeec0 100644 (file)
@@ -382,8 +382,8 @@ void unit_file_dump_changes(int r, const char *verb, const UnitFileChange *chang
                         logged = true;
                         break;
                 case -EIDRM:
-                        log_error_errno(changes[i].type_or_errno, "Failed to %s unit, unit %s is a non-template unit.",
-                                        verb, changes[i].path);
+                        log_error_errno(changes[i].type_or_errno, "Failed to %s %s, destination unit %s is a non-template unit.",
+                                        verb, changes[i].source, changes[i].path);
                         logged = true;
                         break;
                 case -EUCLEAN: