Skip to content

Commit

Permalink
Wait for eth0 to be online in clients
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Sep 15, 2023
1 parent 8ac871d commit ee9beac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hole-punch-interop/src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ function buildSpec(containerImages: { [key: string]: () => string }, {
let startupScriptFn = (actor: "alice" | "bob") => (`
set -ex;
# Wait for eth0 to be online
while ! ip addr show eth0 do sleep 1; done
ROUTER_IP=$$(dig +short ${actor}_router)
INTERNET_SUBNET=$$(curl --silent --unix-socket /var/run/docker.sock http://localhost/networks | jq -r '.[] | select(.Name == \"${internetNetworkName}\") | .IPAM.Config[0].Subnet')
Expand Down

0 comments on commit ee9beac

Please sign in to comment.