diff --git a/run/disk.sh b/run/disk.sh index f9f98e66..165364c7 100644 --- a/run/disk.sh +++ b/run/disk.sh @@ -47,7 +47,7 @@ if [ -f "${DATA}" ]; then REQ=$((DATA_SIZE-OLD_SIZE)) - # Check free diskspace + # Check free diskspace SPACE=$(df --output=avail -B 1 "${STORAGE}" | tail -n 1) if (( REQ > SPACE )); then diff --git a/run/network.sh b/run/network.sh index 45982b7a..122c1fc0 100644 --- a/run/network.sh +++ b/run/network.sh @@ -31,7 +31,10 @@ configureDHCP() { error "and that the NET_ADMIN capability has been added to the container config: --cap-add NET_ADMIN" && exit 16 fi - ip link set "${VM_NET_TAP}" up + while ! ip link set "${VM_NET_TAP}" up; do + info "Waiting for address to become available..." + sleep 2 + done TAP_NR=$(/dev/null 2>&1 || true + closeNetwork + return } diff --git a/run/run.sh b/run/run.sh index 0d6fd478..ff4856f3 100755 --- a/run/run.sh +++ b/run/run.sh @@ -93,7 +93,7 @@ set -m ) set +m -if (( KERNEL > 5 )) || ( (( KERNEL == 5 )) && (( MINOR > 2 )) ); then +if (( KERNEL > 5 )) || ( (( KERNEL == 5 )) && (( MINOR > 10 )) ); then pidwait -F "${_QEMU_PID}" & wait $! else tail --pid "$(cat "${_QEMU_PID}")" --follow /dev/null & wait $!