File: //etc/initramfs-tools/hooks/linuxmdm
#!/bin/sh
# initramfs-tools hook for LinuxMDM (Debian/Ubuntu/Mint flavour).
#
# Drops the recover script into the initramfs and ensures the tools it
# needs (sha256sum, tar, gzip, cat, cp) are available. Triggered by
# `update-initramfs -u` after the package install.
set -e
PREREQ=""
prereqs() { echo "$PREREQ"; }
case $1 in
prereqs) prereqs; exit 0 ;;
esac
. /usr/share/initramfs-tools/hook-functions
# Pull in the binaries our recover script needs. copy_exec resolves and
# bundles their library deps too.
copy_exec /usr/bin/sha256sum
copy_exec /bin/tar
copy_exec /bin/gzip
copy_exec /bin/cat
copy_exec /bin/cp
copy_exec /bin/grep
copy_exec /usr/bin/awk
exit 0