mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-24 21:47:26 +00:00
Refactor Bridge description logic
This commit is contained in:
@@ -618,8 +618,8 @@ advanced_settings() {
|
||||
BRIDGE_MENU_OPTIONS=()
|
||||
while IFS= read -r bridge; do
|
||||
if [[ -n "$bridge" ]]; then
|
||||
# Get description from Proxmox built-in method
|
||||
description=$(grep '^#' /etc/network/interfaces | sed 's/^#\s*//' | tail -n1)
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user