]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: set shutdown watchdog on kexec too
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 18 Jul 2019 13:25:30 +0000 (14:25 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 18 Jul 2019 20:31:43 +0000 (22:31 +0200)
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.

src/core/main.c

index c6294c2f741f9472d0042abafbbe70e5cf30d08a..8de3d4753d6ca1d8d265e2eb25fb99ea5f512ce8 100644 (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) {