2024-07-26 15:33:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
case "$1" in
|
|
|
|
prereqs)
|
|
|
|
echo
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
. /usr/share/initramfs-tools/hook-functions
|
|
|
|
mkdir -p $DESTDIR/systemdecrypt
|
|
|
|
copy_exec /lib/systemd/systemd-cryptsetup /lib/systemd
|
|
|
|
for i in /lib/x86_64-linux-gnu/libtss2*
|
|
|
|
do
|
|
|
|
copy_exec ${i} /lib/x86_64-linux-gnu
|
|
|
|
done
|
2024-07-26 20:54:58 +00:00
|
|
|
if [ -f /lib/x86_64-linux-gnu/cryptsetup/libcryptsetup-token-systemd-tpm2.so ]; then
|
|
|
|
mkdir -p $DESTDIR/lib/x86_64-linux-gnu/cryptsetup
|
|
|
|
copy_exec /lib/x86_64-linux-gnu/cryptsetup/libcryptsetup-token-systemd-tpm2.so /lib/x86_64-linux-gnu/cryptsetup
|
|
|
|
fi
|
2024-07-26 15:33:01 +00:00
|
|
|
mkdir -p $DESTDIR/scripts/local-top
|
|
|
|
|
|
|
|
echo /scripts/local-top/systemdecrypt >> $DESTDIR/scripts/local-top/ORDER
|
|
|
|
|
|
|
|
if [ -f $DESTDIR/cryptroot/crypttab ]; then
|
|
|
|
mv $DESTDIR/cryptroot/crypttab $DESTDIR/systemdecrypt/crypttab
|
|
|
|
fi
|