From b4ead1485407fce8b53ab50a880dc2a8d72038cb Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Mon, 12 May 2025 15:53:35 +0200 Subject: [PATCH] Changes to bridge detection ProxmoxVE/#4413 --- misc/build.func | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 7cc33f5..d084364 100644 --- a/misc/build.func +++ b/misc/build.func @@ -440,8 +440,7 @@ advanced_settings() { # 1. Find all lines starting with 'iface' and store their line numbers # 2. Get the total number of lines in the file # 3. Use awk to create line ranges for each iface section (start:end) - ( grep -Pn '^\s*iface' "${iface_filepath}" | cut -d':' -f1 && wc -l "${iface_filepath}" | cut -d' ' -f1 ) | \ - awk 'FNR==1 {line=$0; next} {print line":"$0-1; line=$0}' > "${iface_indexes_tmpfile}" + ( grep -Pn '^\s*iface' "${iface_filepath}" | cut -d':' -f1 && wc -l "${iface_filepath}" | cut -d' ' -f1 ) | awk 'FNR==1 {line=$0; next} {print line":"$0-1; line=$0}' > "${iface_indexes_tmpfile}" # Check if the indexes file exists, hence has been created if [ -f "${iface_indexes_tmpfile}" ]; then