From 9289844c99e9ede94164aef52f29c85ad16dd1c2 Mon Sep 17 00:00:00 2001 From: sean Date: Wed, 10 Jul 2019 14:50:54 -0700 Subject: [PATCH] tweaks --- setup.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index aac095e..38a1df0 100644 --- a/setup.sh +++ b/setup.sh @@ -267,8 +267,14 @@ echo "errors=\$(echo 'root:${rootpassword}' | chpasswd 2>&1 1>/dev/null)" >> /mn echo "if ! [ \"\$?\" = \"0\" ]; then echo \"Could not set root password - \$errors\"; exit 21; fi" >> /mnt/setup-chroot.sh echo 'echo "Done."'>> /mnt/setup-chroot.sh -echo "systemctl enable zfs-import-bpool.service" >> /mnt/setup-chroot.sh - +echo 'echo ""' >> /mnt/setup-chroot.sh +echo 'echo "Enabling boot pool import service..."'>> /mnt/setup-chroot.sh +echo "errors=\$(systemctl enable zfs-import-bpool.service 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh +echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh +echo ' echo "Failed to enable boot pool import service - $errors"' >> /mnt/setup-chroot.sh +echo " exit 102">> /mnt/setup-chroot.sh +echo "fi">> /mnt/setup-chroot.sh +echo 'echo "Done."'>> /mnt/setup-chroot.sh #cp /usr/sharesystemd/tmp.mount /etc/systemd/system/ #systemctl enable tmp.mount @@ -276,7 +282,7 @@ echo "systemctl enable zfs-import-bpool.service" >> /mnt/setup-chroot.sh #addgroup --system sambashare echo "echo \"Checking ZFS root...\"" >> /mnt/setup-chroot.sh -echo 'zfscheck=$(grub-probe /boot 2>&1 1>/dev/null`' >> /mnt/setup-chroot.sh +echo 'zfscheck=$(grub-probe /boot 2>&1 1>/dev/null)' >> /mnt/setup-chroot.sh echo "if ! [ \"\$?\" = \"0\" ]; then echo \"grub-probe check failed - \$zfscheck\"; exit 2; fi" >> /mnt/setup-chroot.sh echo "echo \"Success.\"" >> /mnt/setup-chroot.sh