diff --git a/install.sh b/install.sh index e97ef93..a4d1d39 100755 --- a/install.sh +++ b/install.sh @@ -139,11 +139,6 @@ fi # wait for the vm to have an IP address . ./management/wait_for_lxc_ip.sh -# wait for the VM to complete its default cloud-init. -while lxc exec ss-mgmt -- [ ! -f /var/lib/cloud/instance/boot-finished ]; do - sleep 1 -done - # do some other preparations for user experience lxc file push ./management/bash_aliases ss-mgmt/home/ubuntu/.bash_aliases lxc file push ./management/bash_profile ss-mgmt/home/ubuntu/.bash_profile @@ -163,8 +158,6 @@ if ! < "$HOME/.bashrc" grep -q "ss-manage"; then ADDED_COMMAND=true fi -wait-for-it -t 300 "$IP_V4_ADDRESS:22" > /dev/null 2>&1 - # Let's remove any entry in our known_hosts, then add it back. # we are using IP address here so we don't have to rely on external DNS # configuration for the base image preparataion. diff --git a/manage.sh b/manage.sh index 990fb99..267ef45 100755 --- a/manage.sh +++ b/manage.sh @@ -35,7 +35,5 @@ fi . ./management/wait_for_lxc_ip.sh -wait-for-it -t 300 "$IP_V4_ADDRESS:22" > /dev/null 2>&1 - # let's ensure ~/.ssh/ssh_config is using the correct IP address for ss-mgmt. ssh ubuntu@"$IP_V4_ADDRESS" diff --git a/management/wait_for_lxc_ip.sh b/management/wait_for_lxc_ip.sh index c09804a..e7598d7 100755 --- a/management/wait_for_lxc_ip.sh +++ b/management/wait_for_lxc_ip.sh @@ -25,3 +25,8 @@ done export IP_V4_ADDRESS="$IP_V4_ADDRESS" + +# wait for the VM to complete its default cloud-init. +while lxc exec ss-mgmt -- [ ! -f /var/lib/cloud/instance/boot-finished ]; do + sleep 1 +done