What command does the system execute when "shut down the system" is pressed? Is it possible to kill that process with root?
Asked
Active
Viewed 2,203 times
1 Answers
0
shutdown -h now most likely.
I don't believe you can cancel it. That's like cancelling the stopping of a service.
You don't want that.
Ali Razmdideh
- 5,868
- 2
- 36
- 53
Stan Smulders
- 131
-
1Well, not exactly cancelling, but it's possible to configure AppArmor or SELinux to not allow running a process with specific args. – Hi-Angel Jun 05 '17 at 22:26
systemctl poweroff,shutdown -h now, also dbus has something. I assume you might try to filter out commands tosystemctl, e.g. swapsystemctlwith a script that if it has argumentpoweroff, do nothing, otherwise call the realsystemctl. Why would you want this in the first place? – Hi-Angel Jun 05 '17 at 21:50TimeoutStopSec=infinity. – Hi-Angel Jun 06 '17 at 04:41Requires=network.target(multiple units separated by space if I'm not mistaken). – Hi-Angel Jun 06 '17 at 05:20