|
|
|
@ -40,7 +40,7 @@ chmod +x /mnt/maintenance.sh
|
|
|
|
echo "zfs mount -a && mount /boot" >> /mnt/maintenance.sh
|
|
|
|
echo "zfs mount -a && mount /boot" >> /mnt/maintenance.sh
|
|
|
|
echo "/bin/bash" >> /mnt/maintenance.sh
|
|
|
|
echo "/bin/bash" >> /mnt/maintenance.sh
|
|
|
|
echo "umount /boot" >> /mnt/maintenance.sh
|
|
|
|
echo "umount /boot" >> /mnt/maintenance.sh
|
|
|
|
echo "zfs umount /var/log" >> /mnt/maintenance.sh
|
|
|
|
echo "zfs umount -a" >> /mnt/maintenance.sh
|
|
|
|
|
|
|
|
|
|
|
|
chroot /mnt /maintenance.sh --login < /dev/tty
|
|
|
|
chroot /mnt /maintenance.sh --login < /dev/tty
|
|
|
|
|
|
|
|
|
|
|
|
@ -55,7 +55,7 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo ""
|
|
|
|
echo "Unbinding mounts..."
|
|
|
|
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
|
|
|
|
if ! [ "$?" = "0" ]; then
|
|
|
|
echo "Failed to unbind mounts - $errors"
|
|
|
|
echo "Failed to unbind mounts - $errors"
|
|
|
|
exit 4
|
|
|
|
exit 4
|
|
|
|
|