Merge pull request #1803 from bergware/master

Fix broken "show_interfaces" script (take 2)
This commit is contained in:
tom mortensen
2024-07-27 01:11:10 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -479,7 +479,7 @@ if (!$all) {
maskIP("/$diag/config/network.cfg");
}
// include listening interfaces
run("$docroot/webGui/scripts/show_interfaces ip|tr -d ' '|tr '#' ' '|tr ',' '\n' >".escapeshellarg("/$diag/config/listen.txt"));
run("$docroot/webGui/scripts/show_interfaces ip|tr ',' '\n' >".escapeshellarg("/$diag/config/listen.txt"));
run("$docroot/webGui/scripts/error_interfaces|sed 's/<i.*i>//' >>".escapeshellarg("/$diag/config/listen.txt"));
if (!$all) maskIP("/$diag/config/listen.txt");

View File

@@ -9,10 +9,10 @@ CALLER="show"
if check && [[ $1 == ip ]]; then
IP=()
for NET in $BIND; do
IP+=("$NET#[$(echo $(show dev $NET)|xargs)]")
IP+=("$NET [$(echo $(show dev $NET)|xargs)]")
done
BIND=${IP[@]}
fi
# return list
echo ${BIND// /#}
echo $BIND