integ/filesystem/drbd/drbd-tools/centos/patches/0002-drbd-conditional-crm-dependency.patch
slin14 05170d50d8 de-fuzz drbd patch
With rpm version < 4.13, patch cmd will create .orig file for fuzzy
patch in default. And this .orig file may lead to rpmbuild failure
"error: Installed (but unpackaged) file(s) found:"

Please visit below link to get more detail info:
https://bugs.launchpad.net/starlingx/+bug/1794611

Story: 2003917
Task: 26962

Change-Id: I9e75bb278e6de63e28b2a1692f03883e5a2e86de
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-10-09 23:05:18 +08:00

27 lines
754 B
Diff

diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
index 2105209..0aa9702 100644
--- a/scripts/drbd.ocf
+++ b/scripts/drbd.ocf
@@ -217,13 +217,17 @@ do_drbdadm() {
}
set_master_score() {
- # Use quiet mode (-Q) to quench logging. Actual score updates
- # will get logged by attrd anyway
- do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1
+ if [ -x ${HA_SBIN_DIR}/crm_master ]; then
+ # Use quiet mode (-Q) to quench logging. Actual score updates
+ # will get logged by attrd anyway
+ do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1
+ fi
}
remove_master_score() {
- do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
+ if [ -x ${HA_SBIN_DIR}/crm_master ]; then
+ do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
+ fi
}
_sh_status_process() {