Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
Patch the kexec-load initscript so that it loads the kernel we want t…
Browse files Browse the repository at this point in the history
…o kexec too even when shutting down (refs AvANa-BBS#53).

By default, that initscript only does useful things at reboot time.
The main use case for wiperam is probably shutting down the system,
so let's apply this hack for the time being.
  • Loading branch information
intrigeri committed Jun 20, 2015
1 parent 11e87e5 commit 0a84119
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions config/hooks/run_kexec-load_even_at_shutdown.chroot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh

# Have kexec-tools run even at shutdown
# Patch not submitted to Debian yet, let's wait and see if our patch
# for Debian#752790 is accepted first.

set -e
set -u

# Use a subshell to make sure we don't mess up $PWD
(

cd /
patch -p1 <<EOF
--- a/etc/init.d/kexec-load 2014-12-01 20:23:12.826065938 +0100
+++ b/etc/init.d/kexec-load 2014-12-01 20:23:31.389572352 +0100
@@ -101,14 +101,6 @@
exit 3
;;
stop)
- # If running systemd, we want kexec reboot only if current
- # command is reboot
- if [ -d /run/systemd/system ]; then
- systemctl list-jobs systemd-reboot.service | grep -q systemd-reboot.service
- if [ $? -ne 0 ]; then
- exit 0
- fi
- fi
do_stop
;;
*)
EOF

)

0 comments on commit 0a84119

Please sign in to comment.