Browse Source

Fixed bug in v-update-sys-ip when multiple interfaces / ips availble (#3688)

When multiple ips or ethernet ports where availble it will get
Jaap Marcus 2 years ago
parent
commit
84fa65fbbc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      bin/v-update-sys-ip

+ 3 - 3
bin/v-update-sys-ip

@@ -48,13 +48,13 @@ for nic in $physical_nics; do
 	if [ -z "$ips" ]; then
 	if [ -z "$ips" ]; then
 		ips="$nic_ipv4s"
 		ips="$nic_ipv4s"
 	else
 	else
-		ips="$ips\n$nic_ipv4s"
+		ips="$ips $nic_ipv4s"
 	fi
 	fi
 done
 done
 
 
 v_ips="$(ls $HESTIA/data/ips/)"
 v_ips="$(ls $HESTIA/data/ips/)"
-ip_num="$(echo "$ips" | wc -l)"
-v_ip_num="$(echo "$v_ips" | wc -l)"
+ip_num="$(echo "$ips" | wc -w)"
+v_ip_num="$(echo "$v_ips" | wc -w)"
 
 
 # Checking primary IP change
 # Checking primary IP change
 if [ "$ip_num" -eq "1" ] && [ "$v_ip_num" -eq "1" ]; then
 if [ "$ip_num" -eq "1" ] && [ "$v_ip_num" -eq "1" ]; then