summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2012-10-15 14:51:27 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-15 16:34:23 +0200
commit44386fc156bfa2d623567ff7f7c8f313cfafb9bc (patch)
tree7d8e25be7932f509621882d00298e68f81a8969e /src/systemctl/systemctl.c
parenta7a3f28be404875eff20443a0fa8088bcc4c18df (diff)
systemctl: don't mangle name when it is a path
systemctl enable, disable, ... can also accept full path and in this case we don't need to alter it. https://bugzilla.redhat.com/show_bug.cgi?id=866346
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d1fbb78e63..7d6a6a24f3 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3594,7 +3594,15 @@ static int mangle_names(char **original_names, char ***mangled_names) {
i = l;
STRV_FOREACH(name, original_names) {
- *i = unit_name_mangle(*name);
+
+ /* When enabling units qualified path names are OK,
+ * too, hence allow them explicitly. */
+
+ if (is_path(*name))
+ *i = strdup(*name);
+ else
+ *i = unit_name_mangle(*name);
+
if (!*i) {
strv_free(l);
return log_oom();