summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/boot/9990-misc-helpers.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/boot/9990-misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh
index 83b822d..611d602 100755
--- a/scripts/boot/9990-misc-helpers.sh
+++ b/scripts/boot/9990-misc-helpers.sh
@@ -989,6 +989,21 @@ find_persistence_media ()
result=$(probe_for_file_name "${overlays}" ${dev})
if [ -n "${result}" ]
then
+ local loopdevice
+ loopdevice=${result##*=}
+ if is_in_comma_sep_list luks ${PERSISTENCE_ENCRYPTION} && is_luks_partition ${loopdevice}
+ then
+ local luksfile
+ luksfile=""
+ if luksfile=$(open_luks_device "${loopdevice}")
+ then
+ result=${result%%=*}
+ result="${result}=${luksfile}"
+ else
+ losetup -d $loopdevice
+ result=""
+ fi
+ fi
ret="${ret} ${result}"
continue
fi