diff options
Diffstat (limited to '')
-rwxr-xr-x | hooks/cryptsetup-nuke-password | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/hooks/cryptsetup-nuke-password b/hooks/cryptsetup-nuke-password new file mode 100755 index 0000000..d350966 --- /dev/null +++ b/hooks/cryptsetup-nuke-password @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +PREREQ="cryptroot" + +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +# Copy the file that we diverted away and that does the real work +if [ -e /lib/cryptsetup/askpass.cryptsetup ]; then + copy_exec /lib/cryptsetup/askpass.cryptsetup +fi + +# Copy the password hash to recognize the nuke password +if [ -e /etc/cryptsetup-nuke-password/password_hash ]; then + copy_file conffile /etc/cryptsetup-nuke-password/password_hash +fi + +copy_exec /usr/lib/cryptsetup-nuke-password/crypt + +exit 0 |