2 # script to check accessibility to the reclock file on a node
4 [ -n "$CTDB_BASE" ] || \
5 export CTDB_BASE
=$
(cd -P $
(dirname "$0") ; dirname "$PWD")
14 if [ -n "$CTDB_RECOVERY_LOCK" ] ; then
15 d
=$
(dirname "$CTDB_RECOVERY_LOCK")
21 # Early exit if not using a reclock file
22 [ -n "$CTDB_RECOVERY_LOCK" ] ||
exit 0
24 # Try to stat the reclock file as a background process so that
25 # we don't block in case the cluster filesystem is unavailable
27 if stat
$CTDB_RECOVERY_LOCK ; then
28 # We could stat the file, reset the counter
34 if ! ctdb_check_counter
"quiet" -ge 200 ; then
35 echo "Reclock file \"$CTDB_RECOVERY_LOCK\" can not be accessed. Shutting down."
41 ctdb_check_counter
"error" -gt 3
45 ctdb_standard_event_handler
"$@"