about summary refs log tree commit diff
path: root/shutdown.d/90-kexec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shutdown.d/90-kexec.sh')
-rw-r--r--shutdown.d/90-kexec.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/shutdown.d/90-kexec.sh b/shutdown.d/90-kexec.sh
new file mode 100644
index 0000000..8b3eb93
--- /dev/null
+++ b/shutdown.d/90-kexec.sh
@@ -0,0 +1,7 @@
+if [ -z "$VIRTUALIZATION" ]; then
+    if [ -e /run/runit/reboot ] && command -v kexec >/dev/null; then
+        msg "Triggering kexec..."
+        kexec -e 2>/dev/null
+        # not reached when kexec was successful.
+    fi
+fi