1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-05-10 11:43:06 +00:00

fix: detect all bridge types, not just vmbr prefix (#4351)

This commit is contained in:
Filippo 2025-05-09 20:53:01 +02:00 committed by GitHub
parent c604aeb064
commit 9d21ceacc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -528,7 +528,7 @@ advanced_settings() {
exit_script
fi
BRIDGES=$( ip link show | grep -oP '(?<=: )vmbr\d+' | sort)
BRIDGES=$( grep -B1 "bridge-" /etc/network/interfaces | grep "iface" | grep -Pv "^\s*#" | awk '{print $2}' | sort | uniq | while read bridge; do ip link show "$bridge" 2> /dev/null | grep -oP "$bridge"; done )
if [[ -z "$BRIDGES" ]]; then
BRG="vmbr0"
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"