diff options
Diffstat (limited to 'scripts/vyatta-address')
-rwxr-xr-x | scripts/vyatta-address | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/vyatta-address b/scripts/vyatta-address index a0c374e6..08e14196 100755 --- a/scripts/vyatta-address +++ b/scripts/vyatta-address @@ -28,6 +28,10 @@ case $1 in fi ;; delete) + if ! /sbin/ip address show dev $2 2>/dev/null | grep -q "$3"; then + # Address doesn't exist there, nothing to delete + exit 0 + fi if [ ! -d "/sys/class/net/$2" ] then # device is already gone exit 0 |