summarylogtreecommitdiffstats
path: root/crm_report.in
blob: c5dff3bdd4ae20f3475de17bbbb6ed19e89c1070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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