[systemd-devel] Option to restart/start a service using sysrq magic key
Lennart Poettering
lennart at poettering.net
Mon Jun 11 15:05:26 UTC 2018
On Mo, 11.06.18 18:13, P.R.Dinesh (pr.dinesh at gmail.com) wrote:
> Is it possible to restart/start a service using sysrq magic key.
That's a kernel concept, systemd is userspace software. Thus we can't
really hook into sysrq handling. Sory.
> In my setup we have a getty service which controls the console. For
> some
The getty unit files we ship generally include Restart= lines to
ensure they get restarted quickly.
> reason this gets stopped. Once the getty service is stopped the console
> connection to the device is hung. The only way to recover is to reboot the
> device. In such case can we use any sysrq magickey to start or restart a
> service or switch to a emergency target?
The kernel allows you to map Ctrl-Alt-Up to some special operation,
and systemd allows that too, as it exposes that event as a request to
pull in kbrequest.target. Fill that with anything you like.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list