File bsc#1178865-0001-Fix-crmadmin-printing-DC-quietly-if-needed.patch of Package pacemaker.20189
From 3512d4217634cc393fe8d2a529481d6998037e1c Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Mon, 23 Nov 2020 13:57:58 +0100
Subject: [PATCH] Fix: crmadmin: printing DC quietly if needed
---
tools/crmadmin.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: pacemaker-2.0.5+20201202.ba59be712/tools/crmadmin.c
===================================================================
--- pacemaker-2.0.5+20201202.ba59be712.orig/tools/crmadmin.c
+++ pacemaker-2.0.5+20201202.ba59be712/tools/crmadmin.c
@@ -236,9 +236,11 @@ controller_event_cb(pcmk_ipc_api_t *cont
break;
case cmd_whois_dc:
- printf("Designated Controller is: %s\n", reply->host_from);
- if (BE_SILENT && (reply->host_from != NULL)) {
- fprintf(stderr, "%s\n", reply->host_from);
+ if (reply->host_from != NULL) {
+ if (BE_SILENT == FALSE) {
+ printf("Designated Controller is: ");
+ }
+ printf("%s\n", reply->host_from);
}
exit_code = CRM_EX_OK;
break;