ctdb-tests: Create 01.reclock.sh
[samba.git] / ctdb / tests / eventscripts / scripts / 01.reclock.sh
1 cleanup_reclock ()
2 {
3         _pattern="${script_dir}/${script}"
4         while pgrep -f "$_pattern" >/dev/null ; do
5                 echo "Waiting for backgrounded ${script} to exit..."
6                 (FAKE_SLEEP_REALLY=yes sleep 1)
7         done
8 }
9
10 setup_reclock ()
11 {
12         CTDB_RECOVERY_LOCK=$(mktemp --tmpdir="$EVENTSCRIPTS_TESTS_VAR_DIR")
13         export CTDB_RECOVERY_LOCK
14
15         test_cleanup cleanup_reclock
16 }