Moar damn commands getting stuck forever for no reason...

This commit is contained in:
Alexandre Aubin 2023-02-07 12:50:04 +01:00
parent 865bb6223b
commit caafd56fed

View file

@ -193,7 +193,7 @@ _LXC_START_AND_WAIT() {
# Wait for container to start, we are using systemd to check this,
# for the sake of brevity.
for j in $(seq 1 10); do
if lxc exec "$1" -- systemctl isolate multi-user.target >/dev/null 2>/dev/null; then
if lxc exec "$1" -- timeout 30 systemctl isolate multi-user.target >/dev/null 2>/dev/null; then
break
fi