From 0b33dd6be98ff31b59bad71198e382bb326052e6 Mon Sep 17 00:00:00 2001 From: sean Date: Wed, 10 Jul 2019 12:12:54 -0700 Subject: [PATCH] tweaks --- setup.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index e789f84..c08b5d7 100644 --- a/setup.sh +++ b/setup.sh @@ -59,8 +59,7 @@ bootmirror=""; rootraidz=""; for disk in `echo "$disks"`; do bootmirror="$bootmi partprobe 2>/dev/null 1>/dev/null # wait for the partitions to show up -for disk in `echo "$disks"` -do +for disk in `echo "$disks"`; do while ! [ -e "/dev/disk/by-id/${disk}-part3" ]; do partprobe 2>/dev/null 1>/dev/null echo "Waiting for ${disk} partition 3 to update..." @@ -226,7 +225,7 @@ echo "echo \"Done.\"" echo "echo \"\"" echo "echo \"Installing linux image, bash, screen, tmux, zfs, dosfstools, openssh...\"" -echo "errors=\$(apt install -y --no-install-recommends linux-image-generic 2\>\&1 1\>/dev/null \&\& apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server 2\>\&1 1\>/dev/null)" >> /mnt/setup-chroot.sh +echo "errors=\$(apt install -y --no-install-recommends linux-image-generic 2>&1 1>/dev/null && apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh echo ' echo "Failed to install preliminary software - $errors"' >> /mnt/setup-chroot.sh echo " exit 1">> /mnt/setup-chroot.sh @@ -236,8 +235,7 @@ echo "echo \"Done.\"" >> /mnt/setup-chroot.sh echo 'echo ""' >> /mnt/setup-chroot.sh echo 'echo "Creating EFI partition..."' >> /mnt/setup-chroot.sh firstdisk=`echo "$disks" | head -n1` -echo "mkdosfs -F 32 -s 1 -n EFI /dev/disk/by-id/${firstdisk}-part2" >> /mnt/setup-chroot.sh -echo "mkdir /boot/efi" >> /mnt/setup-chroot.sh +echo "mkdosfs -F 32 -s 1 -n EFI /dev/disk/by-id/${firstdisk}-part2 && mkdir /boot/efi" >> /mnt/setup-chroot.sh echo "echo PARTUUID=$(blkid -s PARTUUID -o value /dev/disk/by-id/${firstdisk}-part2) /boot/efi vfat nofail,x-systemd.device-timeout=0 0 1 >> /etc/fstab" >> /mnt/setup-chroot.sh echo "mount /boot/efi" >> /mnt/setup-chroot.sh echo "apt install -y grub-efi-amd64-signed shim-signed" >> /mnt/setup-chroot.sh