From 3ee16435eb24b9ba659c4eea00bfe2abdf814b37 Mon Sep 17 00:00:00 2001 From: simono41 Date: Sat, 11 Nov 2017 03:54:36 +0100 Subject: [PATCH] swap --- Simon-OS/arch-install | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Simon-OS/arch-install b/Simon-OS/arch-install index 529e96e..d950f69 100755 --- a/Simon-OS/arch-install +++ b/Simon-OS/arch-install @@ -299,12 +299,17 @@ if [ "${Partition}" == "gpt" ]; then fi if [ "${swap}" != "n" ]; then - if [ "${Partition}" == "gpt" ]; then - swappartition=$(blkid -s PARTUUID -o value ${device}${swappartitionnummer}) - echo "PARTUUID=${swappartition} none swap defaults 0 0" >> ${mountpoint}/etc/fstab - elif [ "${Partition}" == "mbr" ]; then + if [ "${verschluesselung}" == "y" ]; then swappartition=$(blkid -s UUID -o value ${device}${swappartitionnummer}) - echo "UUID=${swappartition} none swap defaults 0 0" >> ${mountpoint}/etc/fstab + echo "swap UUID=${swappartition} /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256" >> ${mountpoint}/etc/crypttab + else + if [ "${Partition}" == "gpt" ]; then + swappartition=$(blkid -s PARTUUID -o value ${device}${swappartitionnummer}) + echo "PARTUUID=${swappartition} none swap defaults 0 0" >> ${mountpoint}/etc/fstab + elif [ "${Partition}" == "mbr" ]; then + swappartition=$(blkid -s UUID -o value ${device}${swappartitionnummer}) + echo "UUID=${swappartition} none swap defaults 0 0" >> ${mountpoint}/etc/fstab + fi fi fi