summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-08-21 14:28:37 +1000
committerAmitay Isaacs <amitay@gmail.com>2012-10-02 17:37:53 +1000
commite2d4250731b1d14aff8c89dcc9ebbd528880856d (patch)
treee0356c6bfa5ce1eb509475bb07292cfa1c4149cb
parent1aaaf7e20e5691ae3cddcfc1e1abd34dbae02c3f (diff)
downloadsamba-e2d4250731b1d14aff8c89dcc9ebbd528880856d.tar.gz
samba-e2d4250731b1d14aff8c89dcc9ebbd528880856d.tar.xz
samba-e2d4250731b1d14aff8c89dcc9ebbd528880856d.zip
Initscript: Kill any existing ctdbd processes if the ping succeeds
Initialising a new ctdbd will destroy the Unix domain socket so existing processes will be useless anyway. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 043ef77086797a703aec436a26a05c56a1bcbf2b)
-rwxr-xr-xctdb/config/ctdb.init6
1 files changed, 6 insertions, 0 deletions
diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init
index 71b187a104..581844d34c 100755
--- a/ctdb/config/ctdb.init
+++ b/ctdb/config/ctdb.init
@@ -257,6 +257,12 @@ start() {
return 0
}
+ # About to start new $ctdbd. The ping above has failed and any
+ # new $ctdbd will destroy the Unix domain socket, so any processes
+ # that aren't yet completely useless soon will be... so kill
+ # them.
+ pkill -9 -f "$ctdbd"
+
build_ctdb_options
# make sure we drop any ips that might still be held if previous