From: Ronnie Sahlberg Date: Wed, 10 Nov 2010 03:45:43 +0000 (+1100) Subject: this stuff is just so fragile that it will enter infinite recovery and fail loops X-Git-Url: http://git.samba.org/?p=metze%2Fctdb%2Fwip.git;a=commitdiff_plain;h=80acca2c91c9053c799365bae918db7ed8bdc56f this stuff is just so fragile that it will enter infinite recovery and fail loops on any kind of tiny unexpected error unconditionally try to remove ip addresses from both old and new interface before trying to add it to the new interface to make it less fragile --- diff --git a/config/events.d/10.interface b/config/events.d/10.interface index 5b31fb81..640d3dba 100755 --- a/config/events.d/10.interface +++ b/config/events.d/10.interface @@ -244,11 +244,8 @@ case "$1" in iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null iptables -I INPUT -i $oiface -d $ip -j DROP - delete_ip_from_iface $oiface $ip $maskbits || { - delete_ip_from_iface $niface $ip $maskbits - iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null - exit 1; - } + delete_ip_from_iface $oiface $ip $maskbits 2>/dev/null + delete_ip_from_iface $niface $ip $maskbits 2>/dev/null add_ip_to_iface $niface $ip $maskbits || { iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null