summaryrefslogtreecommitdiffstats
path: root/src/systemctl
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-09-22 15:38:16 +0200
committerGitHub <noreply@github.com>2022-09-22 15:38:16 +0200
commit28f619d174a3bbcc4fe014883b7b6ae17f4583fd (patch)
tree0f376c2a163354aee9e20c1d8b178f958cb50807 /src/systemctl
parentMerge pull request #24768 from keszybz/table-not-available-2 (diff)
parentsystemctl: Fix style nit (diff)
downloadsystemd-28f619d174a3bbcc4fe014883b7b6ae17f4583fd.tar.xz
systemd-28f619d174a3bbcc4fe014883b7b6ae17f4583fd.zip
Merge pull request #24781 from DaanDeMeyer/link-remove-check
systemctl: Remove check that linked unit files must contain a "/"
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-enable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-enable.c b/src/systemctl/systemctl-enable.c
index a1ca837d4d..7014f92736 100644
--- a/src/systemctl/systemctl-enable.c
+++ b/src/systemctl/systemctl-enable.c
@@ -23,9 +23,10 @@ static int normalize_filenames(char **names) {
"Non-absolute paths are not allowed when --root is used: %s",
*u);
- if (!strchr(*u,'/'))
+ if (!strchr(*u, '/'))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
- "Link argument does contain at least one directory separator: %s",
+ "Link argument must contain at least one directory separator.\n"
+ "If you intended to link a file in the current directory, try ./%s instead.",
*u);
r = path_make_absolute_cwd(*u, &normalized_path);