summaryrefslogtreecommitdiffstats
path: root/lrm/test/lrmregtest-lsb
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:40:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:40:13 +0000
commite9be59e1502a41bab9891d96d753102a7dafef0b (patch)
treec3b2da87c414881f4b53d0964f407c83492d813e /lrm/test/lrmregtest-lsb
parentInitial commit. (diff)
downloadcluster-glue-upstream.tar.xz
cluster-glue-upstream.zip
Adding upstream version 1.0.12.upstream/1.0.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--lrm/test/lrmregtest-lsb54
1 files changed, 54 insertions, 0 deletions
diff --git a/lrm/test/lrmregtest-lsb b/lrm/test/lrmregtest-lsb
new file mode 100644
index 0000000..4692b17
--- /dev/null
+++ b/lrm/test/lrmregtest-lsb
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# WARNING: This script is for LRM regressions tests only
+#
+### BEGIN INIT INFO
+# Provides: lrmregtest
+# Required-Start:
+# Should-Start:
+# Required-Stop:
+# Should-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description: LRM regression tests LSB RA
+# Description: LRM regression tests LSB RA
+### END INIT INFO
+
+TYPE=lrmregtest
+# depends on resource-agents and the OCF
+: ${OCF_ROOT:=/usr/lib/ocf}
+. ${OCF_ROOT}/lib/heartbeat/ocf-shellfuncs
+
+case "$1" in
+ start)
+ echo -n "Starting $TYPE"
+ ha_pseudo_resource lrmregtest_lsb start
+ ;;
+ stop)
+ echo -n "Shutting down $TYPE"
+ ha_pseudo_resource lrmregtest_lsb stop
+ ;;
+ status)
+ echo -n "Checking for $TYPE"
+ ha_pseudo_resource lrmregtest_lsb monitor
+ if [ $? -eq 0 ]; then
+ echo " running"
+ exit 0
+ else
+ echo " stopped"
+ exit 3
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status}"
+ exit 1
+ ;;
+esac
+
+if [ $? -eq 0 ]; then
+ echo " OK"
+ exit 0
+else
+ echo " failed"
+ exit 1
+fi