summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Schaefer <peter.schaefer@physik.hu-berlin.de>2013-05-06 14:20:31 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 14:26:40 +0200
commitf075db09a9627c36c0068471dd5a6ac38163ed09 (patch)
tree07b2e15e8d2435aab2f4f1bb6401c9dc485dc803 /scripts
parent414e4627258b77b83e822312284d3f385a04f768 (diff)
downloadlive-boot-f075db09a9627c36c0068471dd5a6ac38163ed09.tar.gz
live-boot-f075db09a9627c36c0068471dd5a6ac38163ed09.zip
Adding support for luks persistence with persistence files (Closes: #701614).
Diffstat (limited to 'scripts')
-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