Fix for multiple nics when bridge mode changes.

This commit is contained in:
SimonFair
2024-07-07 15:39:31 +01:00
parent c0d4e1de1b
commit 667418e656

View File

@@ -198,7 +198,7 @@ libvirtd_start(){
sed -ri "/<watchdog model='itco' action='reset'\/>/d" "$XML"
fi
# get all interface sections
ROW=($(grep -nhP '<interface type=' "$XML" | grep -Pom1 '^[0-9]+'))
ROW=($(grep -nhP '<interface type=' "$XML" | grep -Po '^[0-9]+'))
# get all source sections
CAT=($(grep -nhP '<source (bridge|dev)=' "$XML" | awk '{print $1$3}'))
for i in ${!ROW[@]}; do