From f53d7e663c215682d9d8646cfab3e4e843cdafdd Mon Sep 17 00:00:00 2001 From: Sean Date: Fri, 2 Aug 2019 12:05:24 -0700 Subject: [PATCH] tweaks --- maintenance.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maintenance.sh b/maintenance.sh index 786386e..1bf1e69 100644 --- a/maintenance.sh +++ b/maintenance.sh @@ -35,7 +35,8 @@ echo "" echo "Entering chroot..." echo "Please execute \"mount /boot\" to access boot partition, type exit to leave:" echo "" -chroot /mnt /bin/bash --login + +chroot /mnt /bin/bash --login < /dev/tty if ! [ "$?" = "0" ]; then echo "Chroot failed with an error" @@ -46,7 +47,7 @@ fi echo "" echo "Unbinding mounts..." -errors=$(mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | xargs -i{} umount -lf {} 2>&1 1>/dev/null && zpool export -a 2>&1 1>/dev/null) +errors=$(mount | grep -v zfs | tac | awk '/\/mnt/ {print \$3}' | xargs -i{} umount -lf {} 2>&1 1>/dev/null && zpool export -a 2>&1 1>/dev/null) if ! [ "$?" = "0" ]; then echo "Failed to unbind mounts - $errors" exit 4