From: Peter Schaefer Date: Mon, 6 May 2013 12:20:31 +0000 (+0200) Subject: Adding support for luks persistence with persistence files (Closes: #701614). X-Git-Tag: debian/4.0_a11-1~2 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=f075db09a9627c36c0068471dd5a6ac38163ed09;hp=414e4627258b77b83e822312284d3f385a04f768;p=live-boot-grml.git Adding support for luks persistence with persistence files (Closes: #701614). --- 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