diff options
Diffstat (limited to 'scripts/vyatta-address')
-rwxr-xr-x | scripts/vyatta-address | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/vyatta-address b/scripts/vyatta-address index 94fb1c59..a0c374e6 100755 --- a/scripts/vyatta-address +++ b/scripts/vyatta-address @@ -18,9 +18,13 @@ case $1 in exec /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --start -ifname "$2" elif [[ "$3" =~ ":" ]] then # Ipv6 address - exec ip -6 addr add "$3" dev "$2" + if ! ip -6 addr list dev $2 | grep -q $3; then + exec ip -6 addr add "$3" dev "$2" + fi else - exec ip addr add "$3" broadcast + dev "$2" + if ! ip addr list dev $2 | grep -q $3; then + exec ip addr add "$3" broadcast + dev "$2" + fi fi ;; delete) |