mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-24 21:47:26 +00:00
Add Description field for Bridges
This commit is contained in:
@@ -630,19 +630,19 @@ advanced_settings() {
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||
else
|
||||
# Build bridge menu with descriptions
|
||||
BRIDGE_MENU_OPTIONS=""
|
||||
BRIDGE_MENU_OPTIONS=()
|
||||
while IFS= read -r bridge; do
|
||||
if [[ -n "$bridge" ]]; then
|
||||
description=$(get_bridge_description "$bridge")
|
||||
if [[ -n "$description" ]]; then
|
||||
BRIDGE_MENU_OPTIONS="${BRIDGE_MENU_OPTIONS}${bridge} \"${bridge} - ${description}\" "
|
||||
BRIDGE_MENU_OPTIONS+=("$bridge" "${bridge} - ${description}")
|
||||
else
|
||||
BRIDGE_MENU_OPTIONS="${BRIDGE_MENU_OPTIONS}${bridge} \"${bridge}\" "
|
||||
BRIDGE_MENU_OPTIONS+=("$bridge" "$bridge")
|
||||
fi
|
||||
fi
|
||||
done <<< "$BRIDGES"
|
||||
|
||||
BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --menu "Select network bridge:" 15 60 6 $BRIDGE_MENU_OPTIONS 3>&1 1>&2 2>&3)
|
||||
BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --menu "Select network bridge:" 15 60 6 "${BRIDGE_MENU_OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||
if [[ -z "$BRG" ]]; then
|
||||
exit_script
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user