wait for lxc network

This commit is contained in:
Jack Ivanov 2021-12-13 21:54:57 +00:00
parent d33ca9a243
commit b2f4073921

View file

@ -25,6 +25,12 @@ lxc network attach lxdbr0 algo eth0 eth0
lxc config device set algo eth0 ipv4.address 10.0.8.100 lxc config device set algo eth0 ipv4.address 10.0.8.100
lxc start algo lxc start algo
ip addr
until dig A +short algo.lxd @10.0.8.1 | grep -vE '^$' > /dev/null; do
sleep 3
done
case ${UBUNTU_VERSION} in case ${UBUNTU_VERSION} in
20.04) 20.04)
lxc exec algo -- apt remove snapd --purge -y || true lxc exec algo -- apt remove snapd --purge -y || true
@ -34,10 +40,4 @@ case ${UBUNTU_VERSION} in
;; ;;
esac esac
ip addr
until dig A +short algo.lxd @10.0.8.1 | grep -vE '^$' > /dev/null; do
sleep 3
done
lxc list lxc list