Commit c051c47f authored by picodotdev's avatar picodotdev
Browse files

Fix reboot

parent f9b4a326
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -836,14 +836,22 @@ function end() {
    if [ "$REBOOT" == "true" ]; then
        echo -e "${GREEN}Arch Linux installed successfully"'!'"${NC}"
        echo ""

        REBOOT="true"
        if [ "$LOG" == "false" ]; then
            set +e
            KEY="reboot"
            for (( i = 15; i >= 1; i-- )); do
                read -r -s -n 1 -t 1 -p "Rebooting in $i seconds... Press any key to abort."$'\n' KEY
                if [ "$KEY" != 'reboot' ]; then
                    REBOOT="false"
                    break
                fi
            done
        if [ "$KEY" == 'reboot' ]; then
            set -e
        fi

        if [ "$REBOOT" == 'true' ]; then
            umount -R /mnt
            reboot
        else