5 # shellcheck disable=SC1091
7 # shellcheck disable=SC1091
10 if [ "$MANAGE_PRO_BRIDGE" == "y" ]; then
11 # Adding an IP address in the libvirt definition for this network results in
12 # dnsmasq being run, we don't want that as we have our own dnsmasq, so set
14 sudo brctl addbr provisioning
15 # sudo ifconfig provisioning 172.22.0.1 netmask 255.255.255.0 up
16 # Use ip command. ifconfig commands are deprecated now.
17 sudo ip addr add dev provisioning 172.22.0.1/24
18 sudo ip link set provisioning up
20 # Need to pass the provision interface for bare metal
21 if [ "$PRO_IF" ]; then
22 sudo brctl addif provisioning "$PRO_IF"
26 if [ "$MANAGE_INT_BRIDGE" == "y" ]; then
27 # Create the baremetal bridge
28 if ! [[ $(ip a show baremetal) ]]; then
29 sudo brctl addbr baremetal
30 # sudo ifconfig baremetal 192.168.111.1 netmask 255.255.255.0 up
31 # Use ip command. ifconfig commands are deprecated now.
32 sudo ip addr add dev baremetal 192.168.111.1/24
33 sudo ip link set baremetal up
36 # Add the internal interface to it if requests, this may also be the interface providing
37 # external access so we need to make sure we maintain dhcp config if its available
38 if [ "$INT_IF" ]; then
39 sudo brctl addif "$INT_IF"
43 # restart the libvirt network so it applies an ip to the bridge
44 if [ "$MANAGE_BR_BRIDGE" == "y" ] ; then
45 sudo virsh net-destroy baremetal
46 sudo virsh net-start baremetal
47 if [ "$INT_IF" ]; then #Need to bring UP the NIC after destroying the libvirt network