From 64c5dc8ec6fab8778a2b74900b793566920ba021 Mon Sep 17 00:00:00 2001 From: Tommaso Chiti Date: Wed, 14 Apr 2021 15:58:50 +0200 Subject: [PATCH] Update easy-arch.sh --- easy-arch.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index e848757..bd2b4ef 100644 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -69,8 +69,8 @@ read -r -p "This will delete the current partition table on $DISK. Do you agree response=${response,,} if [[ "$response" =~ ^(yes|y)$ ]] then - wipefs -af $DISK &>/dev/null - sgdisk -Zo $DISK &>/dev/null + wipefs -af "$DISK" &>/dev/null + sgdisk -Zo "$DISK" &>/dev/null else echo "Quitting." exit @@ -78,7 +78,7 @@ fi # Creating a new partition scheme. echo "Creating new partition scheme on $DISK." -parted -s $DISK \ +parted -s "$DISK" \ mklabel gpt \ mkpart ESP fat32 1MiB 513MiB \ mkpart Cryptroot 513MiB 100% \ @@ -88,7 +88,7 @@ Cryptroot="/dev/disk/by-partlabel/Cryptroot" # Informing the Kernel of the changes. echo "Informing the Kernel about the disk changes." -partprobe $DISK +partprobe "$DISK" # Formatting the ESP as FAT32. echo "Formatting the EFI Partition as FAT32." @@ -139,7 +139,7 @@ genfstab -U /mnt >> /mnt/etc/fstab # Setting hostname. read -r -p "Please enter the hostname: " hostname -echo $hostname > /mnt/etc/hostname +echo "$hostname" > /mnt/etc/hostname # Setting up locales. read -r -p "Please insert the locale you use (format: xx_XX): " locale @@ -172,7 +172,7 @@ echo -e "# Booting with BTRFS subvolume\nGRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETE dd bs=512 count=4 if=/dev/random of=/mnt/root/cryptroot.keyfile iflag=fullblock &>/dev/null chmod 000 /mnt/root/cryptroot.keyfile &>/dev/null cryptsetup -v luksAddKey /dev/disk/by-partlabel/Cryptroot /mnt/root/cryptroot.keyfile -sed -i -e "s,GRUB_CMDLINE_LINUX="",GRUB_CMDLINE_LINUX="cryptdevice=UUID=$UUID:cryptroot root=$BTRFS cryptkey=rootfs:/root/cryptroot.keyfile,g" +sed -i -e "s,GRUB_CMDLINE_LINUX="",GRUB_CMDLINE_LINUX="cryptdevice=UUID="$UUID":cryptroot root=$BTRFS cryptkey=rootfs:/root/cryptroot.keyfile,g" # Configuring the system. arch-chroot /mnt /bin/bash -e <