summaryrefslogtreecommitdiff
path: root/ctdb/config/statd-callout
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-11-19 15:40:08 +1100
committerMichael Adam <obnox@samba.org>2013-11-27 18:46:16 +0100
commita6dbe126f5adb9368143da731a623ce4c61c0203 (patch)
treeb388aa757eada66334e91d591056631621ec2d3b /ctdb/config/statd-callout
parentf279a97ca4b7ed0da9716bf21e17f5865b55a8ae (diff)
downloadsamba-a6dbe126f5adb9368143da731a623ce4c61c0203.tar.gz
ctdb-scripts: Add an early exit to statd-callout's notify case
If $statd_state is empty then the loop will run once and print spurious errors. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb/config/statd-callout')
-rwxr-xr-xctdb/config/statd-callout1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout
index 70665e2b33b..53b408d5544 100755
--- a/ctdb/config/statd-callout
+++ b/ctdb/config/statd-callout
@@ -148,6 +148,7 @@ case "$1" in
awk -v pnn=$pnn 'pnn == $2 { printf "s/^key.*=.*statd-state@\\(%s\\)@\\([^\"]*\\).*/\\1 \\2/p\n", gensub(/\./, "\\\\.", "g", $1) }')
statd_state=$(ctdb catdb ctdb.tdb | sed -n "$sed_expr" | sort)
+ [ -n "$statd_state" ] || exit 0
# The following is dangerous if this script times out before
# all of the smnotify commands are run. Revert to individual