From ac8d24a1cea3a09877d97299e24adb2d8ec0cbd7 Mon Sep 17 00:00:00 2001 From: Eric Warnke Date: Wed, 26 Oct 2016 10:08:23 -0400 Subject: [PATCH] Even with no detected screen size, it should presume 80x24 --- automated install/basic-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 2f55e1b0..7af51c5b 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -32,9 +32,10 @@ useUpdateVars=false IPv4_address="" IPv6_address="" -# Find the rows and columns -rows=$(stty size | awk '{print $1}') -columns=$(stty size | awk '{print $2}') +# Find the rows and columns will default to 80x24 is it can not be detected +screen_size=$(stty size 2>/dev/null || echo 24 80) +rows=$(echo $screen_size | awk '{print $1}') +columns=$(echo $screen_size | awk '{print $2}') # Divide by two so the dialogs take up half of the screen, which looks nice. r=$(( rows / 2 ))