diff options
author | Daniil Baturin <daniil@baturin.org> | 2014-07-25 18:35:40 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2014-07-25 18:35:40 +0200 |
commit | 3dd18271ce1145bdf07b4af381c4ad821951bed8 (patch) | |
tree | 38d09275c21bed1391a462bddf0001946545f704 | |
parent | 974a522ebd298aecb4f502bab89d76a4ddbec899 (diff) | |
download | vyatta-cfg-system-3dd18271ce1145bdf07b4af381c4ad821951bed8.tar.gz vyatta-cfg-system-3dd18271ce1145bdf07b4af381c4ad821951bed8.zip |
Bug #259: do not try to remove addresses that don't exist.
-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 |