From 19d8d7ce33f24b384f941d87c5dc663d54c56828 Mon Sep 17 00:00:00 2001 From: sean Date: Tue, 9 Jul 2019 17:19:48 -0700 Subject: [PATCH] tweaks --- setup.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.sh b/setup.sh index 95b4045..b22a111 100644 --- a/setup.sh +++ b/setup.sh @@ -184,7 +184,7 @@ echo "echo \"Done.\"" >> /mnt/setup-chroot.sh echo "echo \"\"" >> /mnt/setup-chroot.sh echo "echo \"Updating apt repositories inside chroot...\"" >> /mnt/setup-chroot.sh echo "errors=`apt update 2>&1 1>/dev/null`" >> /mnt/setup-chroot.sh -echo "if ! [ \"$?\" = \"0\" ]; then ">> /mnt/setup-chroot.sh +echo "if ! [ \"\$?\" = \"0\" ]; then ">> /mnt/setup-chroot.sh echo " echo \"Failed to update apt repositories inside chroot - $errors\"" >> /mnt/setup-chroot.sh echo " exit 1">> /mnt/setup-chroot.sh echo "fi">> /mnt/setup-chroot.sh @@ -196,17 +196,18 @@ echo "echo 'LANGUAGE=\"en_US:en\"' >> /etc/default/locale">> /mnt/setup-chroot.s echo "echo \"Done.\"" >> /mnt/setup-chroot.sh #dpkg-reconfigure tzdata echo "apt install -y --no-install-recommends linux-image-generic" >> /mnt/setup-chroot.sh +echo "apt-add-repository universe && apt update" >> /mnt/setup-chroot.sh echo "apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server">> /mnt/setup-chroot.sh echo "i=\"0\"" >> /mnt/setup-chroot.sh -echo "for disk in \"$disks\"; do" >> /mnt/setup-chroot.sh +echo "for disk in \"\$disks\"; do" >> /mnt/setup-chroot.sh echo " echo \"mkdosfs -F 32 -s 1 -n EFI /dev/disk/by-id/${disk}-part2\"" >> /mnt/setup-chroot.sh -echo " echo \"mkdir /boot/efi${i}\"" >> /mnt/setup-chroot.sh -echo " echo \"echo PARTUUID=$(blkid -s PARTUUID -o value /dev/disk/by-id/${disk}-part2) /boot/efi${i} vfat nofail,x-systemd.device-timeout=0 0 1 >> /etc/fstab\"" >> /mnt/setup-chroot.sh -echo " echo \"mount /boot/efi${i}\"" >> /mnt/setup-chroot.sh +echo " echo \"mkdir /boot/efi\${i}\"" >> /mnt/setup-chroot.sh +echo " echo \"echo PARTUUID=$(blkid -s PARTUUID -o value /dev/disk/by-id/\${disk}-part2) /boot/efi\${i} vfat nofail,x-systemd.device-timeout=0 0 1 >> /etc/fstab\"" >> /mnt/setup-chroot.sh +echo " echo \"mount /boot/efi\${i}\"" >> /mnt/setup-chroot.sh echo " i=$((i + 1))" >> /mnt/setup-chroot.sh echo "done" >> /mnt/setup-chroot.sh echo "apt install -y grub-efi-amd64-signed shim-signed" >> /mnt/setup-chroot.sh -echo "echo 'root:$rootpassword' | chpasswd" >> /mnt/setup-chroot.sh +echo "echo 'root:${rootpassword}' | chpasswd" >> /mnt/setup-chroot.sh echo "exit 0" >> /mnt/setup-chroot.sh #echo "[Unit]\n DefaultDependencies=no\n Before=zfs-import-scan.service\n Before=zfs-import-cache.service\n \n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStart=/sbin/zpool import -N -o cachefile=none bpool\n [Install]\n WantedBy=zfs-import.target " > /etc/systemd/system/zfs-import-bpool.Service"