Refactor Bridge description logic
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
This commit is contained in:
parent
0d0f2c7d14
commit
592f98dfb7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user