scripts: handle cloud-init status 2

This commit is contained in:
Dan Bungert 2024-01-29 12:29:07 -07:00
parent 9264e23631
commit 29b3f361d1
1 changed files with 12 additions and 1 deletions

View File

@ -45,7 +45,18 @@ then
done
fi
lxc exec $TESTER -- cloud-init status --wait
if ! lxc exec $TESTER -- cloud-init status --wait; then
ec=$?
case $ec in
0|2)
# 2 is warnings
;;
*)
echo "cloud-init status failed with $ec"
exit $ec
;;
esac
fi
lxc exec $TESTER -- sh -ec "
cd ~/subiquity