mirror of
https://github.com/YunoHost/yunohost-ci.git
synced 2024-09-03 20:05:53 +02:00
fix wait_container
This commit is contained in:
parent
0a81acd8e5
commit
975177ebcc
1 changed files with 4 additions and 2 deletions
6
utils.sh
6
utils.sh
|
@ -60,7 +60,7 @@ wait_container()
|
|||
|
||||
# Wait for container to access the internet
|
||||
for j in $(seq 1 10); do
|
||||
if lxc exec "$1" -- /bin/bash -c "wget -q --spider http://github.com"; then
|
||||
if lxc exec "$1" -- /bin/bash -c "which wget > /dev/null 2>&1 && wget -q --spider http://github.com"; then
|
||||
break
|
||||
fi
|
||||
|
||||
|
@ -76,7 +76,9 @@ wait_container()
|
|||
|
||||
# Wait dpkg
|
||||
for j in $(seq 1 10); do
|
||||
if ! lxc exec "$1" -- /bin/bash -c "fuser /var/lib/dpkg/lock > /dev/null 2>&1"; then
|
||||
if ! lxc exec "$1" -- /bin/bash -c "fuser /var/lib/dpkg/lock > /dev/null 2>&1" &&
|
||||
! lxc exec "$1" -- /bin/bash -c "fuser /var/lib/dpkg/lock-frontend > /dev/null 2>&1" &&
|
||||
! lxc exec "$1" -- /bin/bash -c "fuser /var/cache/apt/archives/lock > /dev/null 2>&1"; then
|
||||
break
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue