mirror of
https://github.com/systemd/systemd
synced 2024-10-04 15:21:01 +00:00
shared/install: correctly report changes in install_info_symlink_alias()
Follow-up for b2751cf039
Also make the conditions consistent for install_info_symlink_wants().
Fixes #33411
This commit is contained in:
parent
a159aa07e1
commit
4441cf330b
|
@ -1986,7 +1986,9 @@ static int install_info_symlink_alias(
|
||||||
}
|
}
|
||||||
broken = r == 0; /* symlink target does not exist? */
|
broken = r == 0; /* symlink target does not exist? */
|
||||||
|
|
||||||
RET_GATHER(ret, create_symlink(lp, alias_target ?: info->path, alias_path, force || broken, changes, n_changes));
|
r = create_symlink(lp, alias_target ?: info->path, alias_path, force || broken, changes, n_changes);
|
||||||
|
if (r != 0 && ret >= 0)
|
||||||
|
ret = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2080,7 +2082,7 @@ static int install_info_symlink_wants(
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
q = create_symlink(lp, info->path, path, /* force = */ true, changes, n_changes);
|
q = create_symlink(lp, info->path, path, /* force = */ true, changes, n_changes);
|
||||||
if ((q < 0 && r >= 0) || r == 0)
|
if (q != 0 && r >= 0)
|
||||||
r = q;
|
r = q;
|
||||||
|
|
||||||
if (unit_file_exists(scope, lp, dst) == 0) {
|
if (unit_file_exists(scope, lp, dst) == 0) {
|
||||||
|
|
Loading…
Reference in a new issue