61a62,88 > > cryptdetect () > { > #check if luks > if grub-probe -t abstraction -d ${LINUX_ROOT_DEVICE} | grep "luks" > /dev/null > then > #check if lvm > lvmname="" > if grub-probe -t abstraction -d ${LINUX_ROOT_DEVICE} | grep "lvm" > /dev/null; then > lvmname=":$(dmsetup --noheadings info -c -o vg_name ${LINUX_ROOT_DEVICE})" > fi > #format then insert > cryptdevice_check=$(grub-probe -t cryptodisk_uuid -d ${LINUX_ROOT_DEVICE} | fold -w 4) > cryptdevice_tmp="cryptdevice=/dev/disk/by-uuid/$(echo ${cryptdevice_check} | sed -e "s/ //" -e "s/ /-/" -e "s/ /-/" -e "s/ /-/" -e "s/ /-/" -e "s/ //" -e "s/ //")${lvmname}" > fi > } > > swapresumedetect() > { > swapdev="" > local swapdev_tmp=$(grep "swap" /etc/fstab | sed -e "s/ [^ ]\+//g" -e "s/ //g";) > if [ swapdev_tmp ] > then > swapdev="resume=$(echo $swapdev_tmp | sed "s/ / resume=/g")" > fi > } > 67a95,96 > cryptdetect > swapresumedetect 121c150 < linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} --- > linux ${rel_dirname}/${basename} ${cryptdevice_tmp} ${swapdev} root=${linux_root_device_thisversion} ro ${args}