This commit is contained in:
simono41 2018-04-01 17:45:48 +02:00
parent ddfef3daf1
commit 0125bdc50a

View file

@ -397,15 +397,15 @@ function grubinstall() {
if [ "${swap}" != "n" ]; then
swappartition=$(blkid -s PARTUUID -o value ${device}${swappartitionnummer})
if [ "${usbkey}" == "y" ]; then
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 resume=PARTUUID='$swappartition' cryptkey=UUID='$usbkeyuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 quiet splash"/' ${mountpoint}/etc/default/grub
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 resume=PARTUUID='$swappartition' cryptkey=UUID='$usbkeyuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub
else
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 resume=PARTUUID='$swappartition' nvidia-drm.modeset=1 quiet splash"/' ${mountpoint}/etc/default/grub
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 resume=PARTUUID='$swappartition' nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub
fi
else
if [ "${usbkey}" == "y" ]; then
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 cryptkey=UUID='$usbkeyuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 quiet splash"/' ${mountpoint}/etc/default/grub
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 cryptkey=UUID='$usbkeyuuid':'$usbkeydateisystem':\/archkey nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub
else
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 nvidia-drm.modeset=1 quiet splash"/' ${mountpoint}/etc/default/grub
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="cryptdevice=PARTUUID='$tobootdevice':luks0 nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub
fi
fi
echo "GRUB_ENABLE_CRYPTODISK=y" >> ${mountpoint}/etc/default/grub
@ -415,7 +415,7 @@ function grubinstall() {
tobootdevice=$(blkid -s PARTUUID -o value ${device}${rootpartitionnummer})
if [ "${swap}" != "n" ]; then
swappartition=$(blkid -s PARTUUID -o value ${device}${swappartitionnummer})
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="resume=PARTUUID='$swappartition' nvidia-drm.modeset=1 quiet splash"/' ${mountpoint}/etc/default/grub
sed -i 's/GRUB_CMDLINE_LINUX=.*$/GRUB_CMDLINE_LINUX="resume=PARTUUID='$swappartition' nvidia-drm.modeset=1 splash"/' ${mountpoint}/etc/default/grub
fi
fi
fi