git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a10545a
)
ctdb-scripts: Add early exit for redundant updateip
author
Martin Schwenke
<martin@meltin.net>
Fri, 29 Jul 2016 09:29:23 +0000
(19:29 +1000)
committer
Martin Schwenke
<martins@samba.org>
Wed, 17 Aug 2016 21:00:26 +0000
(23:00 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/10.interface
patch
|
blob
|
history
diff --git
a/ctdb/config/events.d/10.interface
b/ctdb/config/events.d/10.interface
index 51abc4453ab2cae894a2aed91124d20542f76f2a..073bc851408289be38292dec94eb6bd9fa75cce0 100755
(executable)
--- a/
ctdb/config/events.d/10.interface
+++ b/
ctdb/config/events.d/10.interface
@@
-225,6
+225,13
@@
updateip)
get_iface_ip_maskbits "$_oiface" "$_ip" "$_maskbits"
oiface="$iface"
+ # Could check maskbits too. However, that should never change
+ # so we want to notice if it does.
+ if [ "$oiface" = "$niface" ] ; then
+ echo "Redundant \"updateip\" - ${ip} already on ${niface}"
+ exit 0
+ fi
+
ip_block "$ip" "$oiface"
delete_ip_from_iface "$oiface" "$ip" "$maskbits" 2>/dev/null