From 3bcc93d9216ec0d5602cdf8f158472bfb73576c2 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 cd4895d5..a25f0bd9 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 ))