[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ctrl-Alt-Del in systemd



Brian wrote:
> /lib/systemd/system/ctrl-alt-del.target is linked to reboot.target in
> the same directory. It requires systemd-reboot.service which contains
> the line
> 
>    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 [1], so you
> should think in terms of how your own file(s) in /etc/systemd could
> achieve the same objective.
>
> [1] The file could be diverted.

Well, relinking /lib/systemd/system/ctrl-alt-del.target to
poweroff.target appears to be doing the trick, and I guess that this
will remain unaffected.
Thanks for your contribution.


Reply to: