From 60c89b84fc99edd5e73c2e8420c4917b328132b8 Mon Sep 17 00:00:00 2001 From: simono41 Date: Thu, 26 Jul 2018 05:39:07 +0200 Subject: [PATCH] swap-crypt --- arch-install | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch-install b/arch-install index 2252e9d..24cb55d 100755 --- a/arch-install +++ b/arch-install @@ -453,7 +453,7 @@ function installation { if [ "${swap}" != "n" ]; then - if [ "${verschluesselung}" == "y" ]; then + if [ "${swapverschluesselung}" == "y" ]; then swappartition=$(blkid -s PARTUUID -o value ${device}${swappartitionnummer}) echo "swap PARTUUID=${swappartition} /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256" > ${mountpoint}/etc/crypttab echo "/dev/mapper/swap none swap defaults 0 0" >> ${mountpoint}/etc/fstab @@ -894,6 +894,12 @@ function abfrage() { fi read -p "Do you want to create a swap partition? : [Y/n] " swap + if [ "${swap}" != "n" ]; then + echo "WARNING with a encrypted Swap disk you cant go in the hibernate-modus!!!" + read -p "Should the Swap disk be encrypted? : [y/N] " swapverschluesselung + [[ -z "${swapverschluesselung}" ]] && swapverschluesselung=n + fi + read -p "Do you want to create a swapfile? : [y/N] " swapfile if [ "${swapfile}" == "y" ]; then read -p "Do you want create your swapfile with : [2G/4G/8G/16G] " swapfilespeicher