File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -528,15 +528,17 @@ advanced_settings() {
528528 exit_script
529529 fi
530530
531- if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then
532- if [ -z "$BRG" ]; then
533- BRG="vmbr0"
534- echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
535- else
536- echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
537- fi
531+ BRIDGES=$( ip link show | grep -oP '(?<=: )vmbr\d+' | sort)
532+ if [[ -z "$BRIDGES" ]]; then
533+ BRG="vmbr0"
534+ echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
538535 else
539- exit_script
536+ 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)
537+ if [ -z "$BRG" ]; then
538+ exit_script
539+ else
540+ echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
541+ fi
540542 fi
541543
542544 while true; do
You can’t perform that action at this time.
0 commit comments