#!/bin/bash # SPDX-License-Identifier: Apache-2.0 # Client container entrypoint: installs curl, waits for containerlab # to attach the data-plane veth, configures the IP, removes the mgmt # default route so traffic to the server goes through eth1 (data-plane), # and stays alive for docker-exec commands from the Robot test. apt-get update -qq apt-get install -y -qq curl iproute2 > /dev/null 2>&1 # Wait for containerlab to attach eth1. echo "Waiting for eth1 ..." while ! ip link show eth1 > /dev/null 2>&1; do sleep 0.2 done ip link set eth1 up ip addr add ${MY_IP} dev eth1 # Remove the default route so packets to 10.0.x.0/24 go out eth1 # (the connected route) instead of through the mgmt bridge. ip route del default 2>/dev/null || true exec sleep infinity