From bce84e10f8e38982306b07596584287c1d27d79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 4 May 2020 19:45:19 +0200 Subject: [PATCH] shared/install: print name of offending file in error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Unit type slice cannot be templated." ↓ "/etc/systemd/system.control/user@.slice: unit type slice cannot be templated." --- src/shared/install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/install.c b/src/shared/install.c index a692aed96e..1d9d5bf6e9 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1226,7 +1226,7 @@ static int unit_file_load( return -EINVAL; if (unit_name_is_valid(info->name, UNIT_NAME_TEMPLATE|UNIT_NAME_INSTANCE) && !unit_type_may_template(type)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Unit type %s cannot be templated.", unit_type_to_string(type)); + "%s: unit type %s cannot be templated, ignoring.", path, unit_type_to_string(type)); if (!(flags & SEARCH_LOAD)) { r = lstat(path, &st);