From 86f704a633197dc89a52859f2474d4004be2a6fd Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 4 Jan 2022 12:30:20 -0300 Subject: [PATCH] Wait for archiso to finish its tasks --- install.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 7c0d585..41021c4 100755 --- a/install.sh +++ b/install.sh @@ -446,6 +446,16 @@ getDotfiles() { chsh -s $(which zsh) } +checkForGraphicalInterface() { + journalctl --sync + result=$(journalctl -b -r -g "Graphical" | wc -l) + while [ $result -lt 2 ]; do + journalctl --sync + result=$(journalctl -b -r -g "Graphical" | wc -l) + sleep 1 + done +} + steps=( checkUefi updateSystemClock @@ -476,7 +486,6 @@ runScript() { done if [ -d "$HOME/Documents" ]; then - clear whiptail --title "CocoASAIS" --msgbox "Now, we will finish the installation. Press OK and wait." 7 60 getDotfiles whiptail --title "CocoASAIS" --msgbox "All done!" 0 0 @@ -502,10 +511,10 @@ runScript() { if [ $i -gt 0 ]; then welcomeMsg="Welcome back to CocoASAIS!" else + checkForGraphicalInterface welcomeMsg="Welcome to CocoASAIS!" fi - reset whiptail --title "CocoASAIS" --msgbox "${welcomeMsg}" 0 0 while [ $i -le "${#steps[@]}" ]; do