/lib/partman/finish.d/70crypto_aptinstall is in ubiquity 2.18.7.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #!/bin/sh
# Installs userspace tools and helper packages in the target system.
#
. /lib/partman/lib/base.sh
dm_crypt=no
for dev in $DEVICES/*; do
[ -d "$dev" ] || continue
cd $dev
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
[ "$fs" != free ] || continue
[ -f $id/method ] || continue
[ -f $id/crypto_type ] || continue
method=$(cat $id/method)
[ $method = crypto ] || [ $method = crypto_keep ] || continue
type=$(cat $id/crypto_type)
case $type in
dm-crypt)
dm_crypt=yes
;;
esac
done
close_dialog
done
if grep -q " device-mapper$" /proc/misc; then
# We can't check the root node directly because root could be
# on an LVM LV on top of an encrypted device
if type dmsetup >/dev/null 2>&1 && \
dmsetup table | cut -d' ' -f4 | grep -q "crypt" 2>/dev/null; then
apt-install cryptsetup || true
fi
fi
if grep -q " device-mapper$" /proc/misc; then
# We can't check the root node directly because root could be
# on an LVM LV on top of an encrypted device
if type dmsetup >/dev/null 2>&1 && \
dmsetup table | cut -d' ' -f4 | grep -q "crypt" 2>/dev/null; then
apt-install cryptsetup || true
fi
fi
|