Created
July 6, 2015 01:08
-
-
Save fsmithred/cca6f68c20a598393097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select_initrd () { | |
initrd_image=$($DIALOG --file-selection --width=640 --height=640 \ | |
--title="Select initrd image" --text="\n Select the initrd image file. (default: /live/initrd.img) \n${select_initrd_text}\n${custom_initrd_message}" \ | |
--filename="${image_source_dir}/*" ${OKBUTTON} ${QUITBUTTON}) | |
if [[ $? = 1 ]] ; then | |
run_task | |
fi | |
if [[ -z "$initrd_image" ]]; then | |
warning_message="You did not select an initrd image file. | |
If you continue, your boot menu entry | |
will need to be edited manually. " | |
warning_dialog | |
fi | |
initrd_name="${initrd_image##*/}" | |
if [[ $IS_LUKS = "yes" ]] ; then | |
testmount=$(mktemp -d testinitrd.XXXXX) | |
archivemount "$initrd_image" "$testmount" | |
if ! [ -f ${testmount}/lib/cryptsetup/askpass ] ; then | |
echo "This initrd will not work with encrypted persistence. | |
You will need to do extra stuff." | |
warning_message="This initrd will not work with encrypted persistence. | |
Reboot into the system with persistence, and run update-init-crypt.sh. | |
You will find it somewhere under /lib/live/mount/ | |
See the Help section on Encryption for more information." | |
warning_dialog | |
fi | |
fusermount -u "$testmount" | |
rmdir "$testmount" | |
if ! [ -f ${usb_mountpoint}/update-init-crypt.sh ] ; then | |
cp ${r2u_library}/update-init-crypt.sh "$usb_mountpoint" | |
fi | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment