From a581682538a0049adca6eec8a49b4540d2c9046d Mon Sep 17 00:00:00 2001 From: admin666 Date: Tue, 20 Aug 2024 10:23:45 +0000 Subject: [PATCH] setup.sh: enhance waiting for vm to boot --- setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 2ddcc5d..62cf1d0 100755 --- a/setup.sh +++ b/setup.sh @@ -31,7 +31,7 @@ echo "Starting vm..." virsh start ${vm} echo "Waiting for ${vm} to boot..." -sleep 20 +sudo -u admin666 ssh -o ConnectTimeout=60 ${vm} "echo Connected!" echo "Setting up hostname..." sudo -u admin666 ssh -4 ${vm} "sudo hostnamectl set-hostname ${vm}" @@ -46,11 +46,11 @@ echo "Rebooting..." sudo -u admin666 ssh -4 ${vm} "sudo reboot" echo "Waiting for ${vm} to boot..." -sleep 20 +sudo -u admin666 ssh -o ConnectTimeout=60 ${vm} "echo Connected!" echo "Updating packages..." sudo -u admin666 ssh -4 ${vm} "sudo apt-get update" -sudo -u admin666 ssh -4 ${vm} 'sudo apt-get full-upgrade -y -o Dpkg::Options::="--force-confold"' +sudo -u admin666 ssh -4 ${vm} 'sudo apt-get full-upgrade -y -o Dpkg::Options::="--force-confdef"' sudo -u admin666 ssh -4 ${vm} "sudo apt-get autoremove -y" echo "Installing base packages..."