core: set shutdown watchdog on kexec too

At the moment the shutdown watchdog is set only when rebooting.
The set of "things that can go wrong" is not too far off when kexec'ing
and in fact we have a use case where it would be useful - moving to a
new kernel image.
This commit is contained in:
Luca Boccassi 2019-07-18 14:25:30 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent deeabb45ae
commit a637d0f9ec

View file

@ -1396,7 +1396,7 @@ static int become_shutdown(
assert(pos < ELEMENTSOF(command_line));
if (streq(shutdown_verb, "reboot") &&
if (STR_IN_SET(shutdown_verb, "reboot", "kexec") &&
arg_shutdown_watchdog > 0 &&
arg_shutdown_watchdog != USEC_INFINITY) {