Accepting request 344807 from home:yan_gao:branches:network:ha-clustering:Factory:Test

- crm_report: Call "crm report" if available (bsc#950483)

OBS-URL: https://build.opensuse.org/request/show/344807
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=228
This commit is contained in:
Yan Gao 2015-11-17 11:08:54 +00:00 committed by Git OBS Bridge
parent ae257be917
commit 8d5fc47e48
3 changed files with 33 additions and 0 deletions

23
crm_report.in Normal file
View File

@ -0,0 +1,23 @@
#!/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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Nov 16 17:49:49 UTC 2015 - ygao@suse.com
- crm_report: Call "crm report" if available (bsc#950483)
-------------------------------------------------------------------
Thu Nov 12 11:18:49 UTC 2015 - ygao@suse.com

View File

@ -107,6 +107,7 @@ Url: http://www.clusterlabs.org
#Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
Source0: %{name}-%{version}.tar.bz2
Source1: crm_report.in
Source100: pacemaker.rpmlintrc
Patch1: bug-806256_pacemaker-log-level-notice.patch
Patch2: bug-728579_pacemaker-stonith-dev-id.patch
@ -493,6 +494,9 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcpacemaker_remote
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccrm_mon
%endif
mv %{buildroot}%{_sbindir}/crm_report %{buildroot}%{_sbindir}/crm_report.pacemaker
install -m 755 %{S:1} %{buildroot}%{_sbindir}/crm_report
%if %{with coverage}
GCOV_BASE=%{buildroot}/%{_var}/lib/pacemaker/gcov
mkdir -p $GCOV_BASE
@ -709,6 +713,7 @@ fi
%{_sbindir}/crm_shadow
%{_sbindir}/crm_simulate
%{_sbindir}/crm_report
%{_sbindir}/crm_report.pacemaker
%{_sbindir}/crm_ticket
%exclude %{_datadir}/pacemaker/tests
%{_datadir}/pacemaker