Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/441'
Browse files Browse the repository at this point in the history
* origin/pr/441:
  Do not fail if address already exists
  • Loading branch information
marmarek committed Jul 21, 2023
2 parents 5e142b2 + 39b456f commit ba0e7d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network/setup-ip
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ configure_network () {
local secondary_dns="${10}"
local custom="${11}"

/sbin/ip -- address add "$ip/$netmask" dev "$INTERFACE"
/sbin/ip -- address replace "$ip/$netmask" dev "$INTERFACE"
if [[ "$custom" = false ]]; then
/sbin/ip -- neighbour replace to "$gateway" dev "$INTERFACE" \
lladdr "$netvm_mac" nud permanent
fi
if [ -n "$ip6" ]; then
/sbin/ip -- address add "$ip6/$netmask6" dev "$INTERFACE"
/sbin/ip -- address replace "$ip6/$netmask6" dev "$INTERFACE"
if [[ "$custom" = false ]]; then
/sbin/ip -- neighbour replace to "$gateway6" dev "$INTERFACE" \
lladdr "$netvm_mac" nud permanent
Expand Down

0 comments on commit ba0e7d3

Please sign in to comment.