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
This commit is contained in:
parent
a7a3f28be4
commit
44386fc156
|
@ -3594,7 +3594,15 @@ static int mangle_names(char **original_names, char ***mangled_names) {
|
||||||
|
|
||||||
i = l;
|
i = l;
|
||||||
STRV_FOREACH(name, original_names) {
|
STRV_FOREACH(name, original_names) {
|
||||||
|
|
||||||
|
/* 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);
|
*i = unit_name_mangle(*name);
|
||||||
|
|
||||||
if (!*i) {
|
if (!*i) {
|
||||||
strv_free(l);
|
strv_free(l);
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
|
Loading…
Reference in a new issue