From cb1c2d174c1170e89cb69c44c372bd54ca75ce2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 26 Jul 2017 15:53:30 -0400 Subject: [PATCH] man: do not encourgage starting of poweroff/halt/reboot/kexec targets directly Going through logind and systemd allows polkit to be used, the job mode will be set properly, and is generally easier to get correct. Fixes #6452. --- man/systemd.special.xml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 66c45e39a3c..b31c087c763 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -305,8 +305,12 @@ really just halts the system rather than powering it down. - Applications wanting to halt the system should start - this unit. + Applications wanting to halt the system should not start this unit + directly, but should instead execute systemctl halt + (possibly with the option) or call + systemd1's + org.freedesktop.systemd1.Manager.Halt D-Bus method + directly. @@ -336,8 +340,12 @@ A special target unit for shutting down and rebooting the system via kexec. - Applications wanting to reboot the system with kexec - should start this unit. + Applications wanting to reboot the system should not start this unit + directly, but should instead execute systemctl kexec + (possibly with the option) or call + systemd1's + org.freedesktop.systemd1.Manager.KExec D-Bus method + directly. @@ -430,8 +438,12 @@ A special target unit for shutting down and powering off the system. - Applications wanting to power off the system should - start this unit. + Applications wanting to reboot the system should not start this unit + directly, but should instead execute systemctl poweroff + (possibly with the option) or call + systemd-logind8's + org.freedesktop.login1.Manager.PowerOff D-Bus method + directly. runlevel0.target is an alias for this target unit, for compatibility with SysV. @@ -443,8 +455,12 @@ A special target unit for shutting down and rebooting the system. - Applications wanting to reboot the system should start - this unit. + Applications wanting to reboot the system should not start this unit + directly, but should instead execute systemctl reboot + (possibly with the option) or call + systemd-logind8's + org.freedesktop.login1.Manager.Reboot D-Bus method + directly. runlevel6.target is an alias for this target unit, for compatibility with SysV. -- 2.47.3