setup.sh: enhance waiting for vm to boot
This commit is contained in:
parent
610daffb7f
commit
a581682538
6
setup.sh
6
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..."
|
||||
|
|
Loading…
Reference in New Issue