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:
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user