git.samba.org
/
metze
/
ctdb
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ba7028
)
In the example script to remove all ip addresses after a ctdb crash,
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 22 Apr 2010 22:35:01 +0000
(08:35 +1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 22 Apr 2010 22:35:01 +0000
(08:35 +1000)
add the NATGW address as one to be removed in addition to the
public addresses.
config/ctdb-crash-cleanup.sh
patch
|
blob
|
history
diff --git
a/config/ctdb-crash-cleanup.sh
b/config/ctdb-crash-cleanup.sh
index ca6a83860d1004476bb29812795db886baf4ca51..420db76727b9e65f7fa625647f9ddd6752b1c3de 100755
(executable)
--- a/
config/ctdb-crash-cleanup.sh
+++ b/
config/ctdb-crash-cleanup.sh
@@
-22,7
+22,7
@@
ctdb status 2>/dev/null && {
exit 0
}
-
cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1
| while read _IP; do
+
(cat /etc/sysconfig/ctdb | egrep "^CTDB_NATGW_PUBLIC_IP" | sed -e "s/.*=//" -e "s/\/.*//";cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1)
| while read _IP; do
_IP_HELD=`/sbin/ip addr show | grep "inet $_IP/"`
[ -z "$_IP_HELD" ] || {
_IFACE=`echo $_IP_HELD | sed -e "s/.*\s//"`