Skip to content

Commit 84fa65f

Browse files
authored
Fixed bug in v-update-sys-ip when multiple interfaces / ips availble (hestiacp#3688)
When multiple ips or ethernet ports where availble it will get
1 parent c8a6365 commit 84fa65f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/v-update-sys-ip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ for nic in $physical_nics; do
4848
if [ -z "$ips" ]; then
4949
ips="$nic_ipv4s"
5050
else
51-
ips="$ips\n$nic_ipv4s"
51+
ips="$ips $nic_ipv4s"
5252
fi
5353
done
5454

5555
v_ips="$(ls $HESTIA/data/ips/)"
56-
ip_num="$(echo "$ips" | wc -l)"
57-
v_ip_num="$(echo "$v_ips" | wc -l)"
56+
ip_num="$(echo "$ips" | wc -w)"
57+
v_ip_num="$(echo "$v_ips" | wc -w)"
5858

5959
# Checking primary IP change
6060
if [ "$ip_num" -eq "1" ] && [ "$v_ip_num" -eq "1" ]; then

0 commit comments

Comments
 (0)