summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/UNIT/eventscripts/stubs/tdbtool
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
commit4f5791ebd03eaec1c7da0865a383175b05102712 (patch)
tree8ce7b00f7a76baa386372422adebbe64510812d4 /ctdb/tests/UNIT/eventscripts/stubs/tdbtool
parentInitial commit. (diff)
downloadsamba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz
samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ctdb/tests/UNIT/eventscripts/stubs/tdbtool')
-rwxr-xr-xctdb/tests/UNIT/eventscripts/stubs/tdbtool33
1 files changed, 33 insertions, 0 deletions
diff --git a/ctdb/tests/UNIT/eventscripts/stubs/tdbtool b/ctdb/tests/UNIT/eventscripts/stubs/tdbtool
new file mode 100755
index 0000000..816df3b
--- /dev/null
+++ b/ctdb/tests/UNIT/eventscripts/stubs/tdbtool
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+do_help ()
+{
+ if [ "$FAKE_TDBTOOL_SUPPORTS_CHECK" = "yes" ] ; then
+ echo "check"
+ fi
+ exit 0
+}
+
+do_check ()
+{
+ if [ "$FAKE_TDB_IS_OK" = "yes" ] ; then
+ echo "Database integrity is OK"
+ else
+ echo "Database is busted"
+ fi
+ exit 0
+}
+
+do_cmd ()
+{
+ case "$*" in
+ *check) do_check ;;
+ help) do_help ;;
+ "") read tdb_cmd && [ -n "$tdb_cmd" ] && do_cmd $tdb_cmd ;;
+ *) echo "$0: Not implemented: $*" ; exit 1 ;;
+ esac
+}
+
+do_cmd $*
+
+exit 0