/lib/partman/update.d/61crypto_visuals is in ubiquity 18.04.14.
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 49 50 51 52 | #!/bin/sh
# Shows "crypto" in the method column for partitions with method "crypto" and
# the humandev name of the crypt disk as mountpoint, so the user can see which
# dm device is which after they've been setup.
. /lib/partman/lib/base.sh
dev=$1
num=$2
id=$3
size=$4
type=$5
fs=$6
path=$7
name=$8
cd $dev
[ -f $id/method ] || exit 0
method=$(cat $id/method)
cryptdev_shortname ()
{
case "$1" in
/dev/mapper/*)
echo "${1#/dev/mapper/}"
;;
*)
echo "$1"
;;
esac
}
case $method in
crypto|crypto_keep)
db_metaget partman/method_short/crypto description || RET=''
echo ${RET:-crypto} >$id/visual_filesystem
if [ -f $id/crypt_active ]; then
RET=$(cryptdev_shortname $(cat $id/crypt_active))
RET="($RET)"
else
db_metaget partman-crypto/text/not_active description || RET=''
fi
echo ${RET:-not active} >$id/visual_mountpoint
# open_dialog CHANGE_FILE_SYSTEM $id linux-swap
# close_dialog
;;
esac
|