]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl: warn if trying to disable a unit with no install info
authorMike Yuan <me@yhndnzj.com>
Fri, 18 Nov 2022 07:43:34 +0000 (15:43 +0800)
committerMike Yuan <me@yhndnzj.com>
Sat, 3 Dec 2022 12:26:14 +0000 (20:26 +0800)
commitbf1bea43f15b04152a3948702ba1695a0835c2bf
tree3c919627634b4b63dca861de01699b90308a9032
parentbef69ae8780da17a807881d078247259170f868e
systemctl: warn if trying to disable a unit with no install info

Trying to disable a unit with no install info is mostly useless, so
adding a warning like we do for enable (with the new dbus method
'DisableUnitFilesWithFlagsAndInstallInfo()'). Note that it would
still find and remove symlinks to the unit in /etc, regardless of
whether it has install info or not, just like before. And if there are
actually files to remove, we suppress the warning.

Fixes #17689
man/org.freedesktop.systemd1.xml
src/core/dbus-manager.c
src/shared/install.c
src/systemctl/systemctl-enable.c