summaryrefslogtreecommitdiffstats
path: root/discover/boot.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-05-01 16:53:20 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-05-06 09:02:12 +0800
commitee329cc09cfbeefac95efeda31bb9ef839dd1382 (patch)
tree494f194e02ba92dee7f8884808ae4de9db297d46 /discover/boot.c
parent9f28cabee06b68047f8a61389b7c857c636c329e (diff)
downloadtalos-petitboot-ee329cc09cfbeefac95efeda31bb9ef839dd1382.tar.gz
talos-petitboot-ee329cc09cfbeefac95efeda31bb9ef839dd1382.zip
discover: kexec harder
`kexec -e` will just call shutdown, which we've already tried, so it's likely to fail. Add a further fallback to force a kexec with -e -f options. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/boot.c')
-rw-r--r--discover/boot.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/discover/boot.c b/discover/boot.c
index d054d5d..29aefa9 100644
--- a/discover/boot.c
+++ b/discover/boot.c
@@ -94,6 +94,21 @@ static int kexec_reboot(int dry_run)
if (result)
pb_log("%s: failed: (%d)\n", __func__, result);
+ /* okay, kexec -e -f */
+ if (result) {
+ p = argv;
+ *p++ = pb_system_apps.kexec; /* 1 */
+ *p++ = "-e"; /* 2 */
+ *p++ = "-f"; /* 3 */
+ *p++ = NULL; /* 4 */
+
+ result = pb_run_cmd(argv, 1, 0);
+ }
+
+ if (result)
+ pb_log("%s: failed: (%d)\n", __func__, result);
+
+
return result;
}
OpenPOWER on IntegriCloud