Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-support / drbd / drbd-utils / 0002-drbd-conditional-crm-dependency.patch
1 diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
2 index 2105209..0aa9702 100644
3 --- a/scripts/drbd.ocf
4 +++ b/scripts/drbd.ocf
5 @@ -217,13 +217,17 @@ do_drbdadm() {
6  }
7  
8  set_master_score() {
9 -       # Use quiet mode (-Q) to quench logging. Actual score updates
10 -       # will get logged by attrd anyway
11 -       do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1
12 +       if [ -x ${HA_SBIN_DIR}/crm_master ]; then
13 +               # Use quiet mode (-Q) to quench logging. Actual score updates
14 +               # will get logged by attrd anyway
15 +               do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1
16 +       fi
17  }
18  
19  remove_master_score() {
20 -       do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
21 +       if [ -x ${HA_SBIN_DIR}/crm_master ]; then
22 +               do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
23 +       fi
24  }
25  
26  _sh_status_process() {