Skip to content

Commit 81d154f

Browse files
LaurennusJarkko Toivanen
andauthored
Fixed a bug when there is multiple network cards but not all have IP (hestiacp#4728)
If a NIC didn't have an IP it would have added a trailing space breaking multiple configs and future attempts to IP updates. Co-authored-by: Jarkko Toivanen <jt@jakest.us>
1 parent 3829beb commit 81d154f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/v-update-sys-ip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ for nic in $nics; do
4848
if [ -z "$ips" ]; then
4949
ips="$nic_ipv4s"
5050
else
51+
if [ -z "$nic_ipv4s" ]; then
52+
break
53+
fi
5154
ips="$ips $nic_ipv4s"
5255
fi
5356
done

0 commit comments

Comments
 (0)