Re: Ctrl-Alt-Del in systemd
On Fri 14 Feb 2014 at 18:23:14 +0100, Siard wrote:
> Using the console, I used to switch off my PC with Ctrl-Alt-Del.
> For that to work, I had these lines in /etc/inittab:
> # What to do when CTRL-ALT-DEL is pressed.
systemd doesn't use inittab (it's a sysvinit file).
> It was the easiest way to switch off the machine that I knew of.
> Now is there something similar with systemd?
> Ctrl-Alt-Del appears to reboot the machine now.
/lib/systemd/system/ctrl-alt-del.target is linked to reboot.target in
the same directory. It requires systemd-reboot.service which contains
ExecStart=/bin/systemctl --force reboot
Changing 'reboot' to 'poweroff' will get you what you want.
However, this is the wrong thing to do (but is useful for testing the
idea) because your changes will disappear at upgrade time , so you
should think in terms of how your own file(s) in /etc/systemd could
achieve the same objective.
 The file could be diverted.