]> git.ipfire.org Git - thirdparty/systemd.git/commit
install: when disabling units, do so even if the unit is missing
authorLennart Poettering <lennart@poettering.net>
Fri, 10 Feb 2017 11:23:22 +0000 (12:23 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 Feb 2017 13:36:17 +0000 (14:36 +0100)
commit637d6e5b9c97afdd284f684c319cb4274bb8abcf
tree22bce3a5de4f072cb5289a86d3dd057d770e2626
parent807fa5d9a01b2bd80ac821d3a165bfef0323c20c
install: when disabling units, do so even if the unit is missing

In some cases there might be unit symlinks in .wants/ or .requires/
directories even though the unit is otherwise fully removed. In this
case, don't fail removal, but still remove the symlinks.

This reworks the symlink marking logic to always add unit files that we
are missing to the changes list, but proceed with any symlink removal
for them. This way we'll still generate useful hints that a unit is
missing if you invoke "systemctl disable idontexist.service", but also
still remove any link to it.

Fixes: #4995
src/core/dbus-manager.c
src/shared/install.c