summarylogtreecommitdiffstats
path: root/crm_report.in
diff options
context:
space:
mode:
authorBrian Bidulock2018-07-09 01:35:29 -0600
committerBrian Bidulock2018-07-09 01:35:29 -0600
commitd115e2de8f94de3e6d45b440ab97942343ea8bd4 (patch)
tree7edf05abf5df3c7faa73b3f93151d0ec04e5658a /crm_report.in
downloadaur-d115e2de8f94de3e6d45b440ab97942343ea8bd4.tar.gz
initial version
Diffstat (limited to 'crm_report.in')
-rw-r--r--crm_report.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/crm_report.in b/crm_report.in
new file mode 100644
index 00000000000..c5dff3bdd4a
--- /dev/null
+++ b/crm_report.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# Copyright (C) 2007 Dejan Muhamedagic <dmuhamedagic@suse.com>
+# Copyright (C) 2015 Kristoffer Gronlund <kgronlund@suse.com>
+# Copyright (C) 2015 Gao,Yan <ygao@suse.com>
+#
+# Replaced with crm report
+PARENT_COMMAND="$(ps -o comm= $PPID)"
+PROG="$(basename "$0")"
+
+die() {
+ echo "$PROG: $*"
+ exit 1
+}
+[ "$(basename "$PARENT_COMMAND")" = "crm" ] && die "called itself in a loop, aborting"
+if which crm > /dev/null 2>&1; then
+ crm report "$@"
+elif [ -x /usr/sbin/crm ]; then
+ /usr/sbin/crm report "$@"
+else
+ #die "crm_report has been deprecated: Please install crmsh, which replaces it"
+ /usr/sbin/crm_report.pacemaker "$@"
+fi
+