1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-05-09 16:43:07 +00:00

build.func Change the menu for Bridge Selection (#4326)

* Change the menu for Bridge Selection

* Change the menu for Bridge Selection

* Change the menu for Bridge Selection
This commit is contained in:
Michel Roegl-Brunner 2025-05-08 15:50:34 +02:00 committed by GitHub
parent 19800da808
commit 402586756f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -528,15 +528,17 @@ advanced_settings() {
exit_script
fi
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then
if [ -z "$BRG" ]; then
BRG="vmbr0"
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
else
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
fi
BRIDGES=$( ip link show | grep -oP '(?<=: )vmbr\d+' | sort)
if [[ -z "$BRIDGES" ]]; then
BRG="vmbr0"
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
else
exit_script
BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --menu "Select network bridge:" 10 40 6 $(echo "$BRIDGES" | awk '{print $0, "Bridge"}') 3>&1 1>&2 2>&3)
if [ -z "$BRG" ]; then
exit_script
else
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
fi
fi
while true; do