From 2ab4c0fe4c64b0305f1e14bdf4e24b6c86a7885f Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Wed, 5 Apr 2017 21:15:38 +0200 Subject: [PATCH] Tiny adjustment to exit logic --- .../usr/lib/nand-sata-install/nand-sata-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh b/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh index 88b85ebad8..6ec92d9ccf 100644 --- a/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh +++ b/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh @@ -445,8 +445,9 @@ main() [[ ( -n $nandcheck || -n $emmccheck ) && -n $satacheck ]] && options=(${options[@]} 2 'Boot from '$ichip' - system on SATA or USB') [[ -n $satacheck ]] && options=(${options[@]} 3 'Boot from SD - system on SATA or USB') - [[ ${#options[@]} -eq 0 || "$root_partition" == "$emmcuuid" || "$root_partition" == "/dev/nand2" ]] && dialog --title "$title" --backtitle "$backtitle" --colors --infobox "\n\Z1There are no targets. Please check your drives.\Zn" 5 60 && exit 1 - + [[ ${#options[@]} -eq 0 || "$root_partition" == "$emmcuuid" || "$root_partition" == "/dev/nand2" ]] && \ + dialog --title "$title" --backtitle "$backtitle" --colors --no-collapse --msgbox "\n\Z1There are no targets. Please check your drives.\Zn" 7 54 + [[ $? -ne 0 ]] && exit 1 cmd=(dialog --title "Choose an option:" --backtitle "$backtitle" --menu "\nCurrent root: $root_partition \n \n" 12 60 7) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) [[ $? -ne 0 ]] && exit 1