From b006c4f74bae0d0b35f98ad6e4cee24ee2f9c88c Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Fri, 10 Oct 2025 09:28:20 +0200 Subject: [PATCH] Revert: Change Bridge detection to inlcude interface.vlan bridges as well --- misc/build.func | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/misc/build.func b/misc/build.func index 159e230f..c53632a9 100644 --- a/misc/build.func +++ b/misc/build.func @@ -598,7 +598,7 @@ advanced_settings() { start=$(echo "${pair}" | cut -d':' -f1) end=$(echo "${pair}" | cut -d':' -f2) - if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*(bridge[-_](ports|stp|fd|vlan-aware|vids)|ovs_type\s+OVSBridge|vlan-raw-device)\b'; then + if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*(bridge[-_](ports|stp|fd|vlan-aware|vids)|ovs_type\s+OVSBridge)\b'; then iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}') BRIDGES="${iface_name}"$'\n'"${BRIDGES}" fi @@ -618,23 +618,8 @@ advanced_settings() { BRIDGE_MENU_OPTIONS=() while IFS= read -r bridge; do if [[ -n "$bridge" ]]; then - # Check if this is a VLAN interface (pattern: name.vlan_id) - if [[ "$bridge" =~ ^(.+)\.([0-9]+)$ ]]; then - parent_device="${BASH_REMATCH[1]}" - vlan_id="${BASH_REMATCH[2]}" - - # Try to get the actual parent device from vlan-raw-device line - vlan_raw_device=$(grep -A 10 "iface $bridge" /etc/network/interfaces | grep '^\s*vlan-raw-device' | awk '{print $2}') - if [[ -n "$vlan_raw_device" ]]; then - parent_device="$vlan_raw_device" - fi - - description="VLAN $vlan_id on $parent_device" - else - # Regular bridge - get description from Proxmox built-in method - find comment for this specific bridge - description=$(grep -A 10 "iface $bridge" /etc/network/interfaces | grep '^#' | head -n1 | sed 's/^#\s*//') - fi - + # Get description from Proxmox built-in method - find comment for this specific bridge + description=$(grep -A 10 "iface $bridge" /etc/network/interfaces | grep '^#' | head -n1 | sed 's/^#\s*//') if [[ -n "$description" ]]; then BRIDGE_MENU_OPTIONS+=("$bridge" "${description}") else