bb58b9e6d6
ifconfig and brctl are deprecated commands. They are replaced with ip command. Story: 2004646 Task: 28597 Change-Id: I24e2d53ae7f8b866eef665a85d1785df0527c82a Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe_57@live.com.mx> Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
14 lines
418 B
Bash
Executable File
14 lines
418 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
|
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-10.10.10.0/24}
|
|
EXTERNAL_IP=${EXTERNAL_IP:-10.10.10.1/24}
|
|
|
|
for i in {1..4}; do
|
|
BRIDGE_INTERFACE_NAME=${BRIDGE_INTERFACE}$i
|
|
if [ -d "/sys/class/net/${BRIDGE_INTERFACE_NAME}" ]; then
|
|
sudo ip link set dev ${BRIDGE_INTERFACE_NAME} down
|
|
sudo ip link delete dev ${BRIDGE_INTERFACE_NAME}
|
|
fi
|
|
done
|