From 825eba3a2bfb4575c217084403a31c1df3089ce5 Mon Sep 17 00:00:00 2001 From: proledatarian Date: Sun, 13 Feb 2022 23:48:01 +0000 Subject: [PATCH] Update install.sh --- install.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/install.sh b/install.sh index 8a88d48..da2ad96 100644 --- a/install.sh +++ b/install.sh @@ -20,20 +20,20 @@ echo IFS=$'\n' # Set variable containing name and size of all disks. -disks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') ) +dsks=( $(lsblk -d | tail -n+2 | awk '{print $1" "$4}') ) # Declare the array. -declare -a disks +declare -a dsks # Select value on array. -select disk in ${disks[*]} +select dev in ${dsks[*]} do # Separate values by spaces. IFS=' ' # Create new variable of selection. -array=($disk) +array=($dev) dev="${array[0]}" echo @@ -47,7 +47,7 @@ sgdisk -Z /dev/$dev && echo # Creating boot partition. -size="${array[1]%?}" +szmn="${array[1]%?}" echo "Creating boot partition of 256 MB." sgdisk -n 1:0:+256M /dev/$dev && echo @@ -56,7 +56,7 @@ echo sgdisk -t 1:ef00 /dev/$dev && # Creating system partition. -echo "Creating system partition of $size GB." +echo "Creating system partition of $szmn GB." sgdisk -n 2:0:0 /dev/$dev echo @@ -67,7 +67,7 @@ sleep 1 echo # This needs to be deleted. -echo $dev > /tmp/disk +echo $dev > /tmp/dev # Exit. break @@ -75,35 +75,35 @@ done # This needs to be deleted. # Get variable from filesystem. -part=$( /mnt/boot/loader/entries/arch-fallback.conf title Arch Linux Fallback linux /vmlinuz-linux initrd /initramfs-linux-fallback.img -options cryptdevice=/dev/$part:lvm +options cryptdevice=/dev/$main:lvm options root=/dev/mapper/main-root rw options lang=de locale=de_DE.UTF-8 options init=/usr/lib/systemd/systemd