ctdb-recoverd: Send leader broadcasts
[samba.git] / selftest / ns / add_bridge_iface.sh
blobda9d53a5987b506c8ade29362621e7a6f39c0773
1 #!/bin/sh
3 # Configures the interfaces needed for communication between namespaces.
4 # This handles the bridge-end of the veth pair.
5 interface=$1
7 # the main bridge interface is called 'selftest0' (although in future we may
8 # want to segregate the different domains by using different bridges)
9 bridge=$2
11 # we need to wait for the child namespace to start up and add the new
12 # interface back to our new namespace
13 while ! ip link show $interface > /dev/null 2>&1
15 sleep 0.1
16 echo "Waiting for $interface to be created..."
17 done
19 # bring the bridge-end of the link up and add it to the bridge
20 ip link set dev $interface up
21 ip link set $interface master $bridge