Merge pull request #13635 from fbuihuu/no-aliases-with-enable

man: alias names can't be used with enable command
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-10-28 09:23:08 +01:00
committed by GitHub
3 changed files with 9 additions and 7 deletions
+4 -2
View File
@@ -1903,11 +1903,13 @@ static int install_error(
case -ELOOP:
r = sd_bus_error_setf(error, BUS_ERROR_UNIT_LINKED,
"Refusing to operate on linked unit file %s", changes[i].path);
"Refusing to operate on alias name or linked unit file: %s",
changes[i].path);
goto found;
case -ENOENT:
r = sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT, "Unit file %s does not exist.", changes[i].path);
r = sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT,
"Unit file %s does not exist.", changes[i].path);
goto found;
default:
+1 -1
View File
@@ -1897,7 +1897,7 @@ static int install_context_apply(
q = install_info_traverse(scope, c, paths, i, flags, NULL);
if (q < 0) {
unit_file_changes_add(changes, n_changes, r, i->name, NULL);
unit_file_changes_add(changes, n_changes, q, i->name, NULL);
return q;
}