summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2019-03-31 21:32:53 -0600
committerAaron Ball <nullspoon@oper.io>2019-03-31 21:32:53 -0600
commitdc321dba3e5d0b69d84123df1e0fb3afb19f2bbf (patch)
tree89b222b6900d475bfb21263aeb631c7a1996b8db
parentcd3afef46d3704289a83c0674f450e9764eaf563 (diff)
downloadmkinitramfs-dc321dba3e5d0b69d84123df1e0fb3afb19f2bbf.tar.gz
mkinitramfs-dc321dba3e5d0b69d84123df1e0fb3afb19f2bbf.tar.xz
init:Fix reboot on decrypt failure
Previously, we were calling `init 6` to perform a reboot on failed decryption operations. This caused the init script to call itself. Being an init script for an initramfs, it ignored runlevels when called, so this just restarted the boot process. Now we use the sysrq trigger to perform the reboot.
-rwxr-xr-xinit2
1 files changed, 1 insertions, 1 deletions
diff --git a/init b/init
index 239a53e..89eec1b 100755
--- a/init
+++ b/init
@@ -104,7 +104,7 @@ setup_encrypted() {
printf 'Dropping to debug shell (will automatically reboot on exit).\n' >&2
/bin/bash --norc
printf 'Rebooting\n' >&2
- init 6
+ printf 'b' > /proc/sysrq-trigger
fi
# Probe the new crypto device for an additional partition table

Generated by cgit