|
 |
7ebc05 |
commit 20d6b6e542b9814b081355ed19874f75445b0901
|
|
 |
7ebc05 |
Author: Andrew Beekhof <andrew@beekhof.net>
|
|
 |
7ebc05 |
Date: Tue Apr 8 15:44:00 2014 +1000
|
|
 |
7ebc05 |
|
|
 |
7ebc05 |
Fix: lrmd: Expose logging variables expected by OCF agents
|
|
 |
7ebc05 |
|
|
 |
7ebc05 |
(cherry picked from commit fa8bd56b776b97c3c845986d084c01b4aaf4063c)
|
|
 |
7ebc05 |
|
|
 |
7ebc05 |
diff --git a/lrmd/main.c b/lrmd/main.c
|
|
 |
7ebc05 |
index 38c5466..8e00f11 100644
|
|
 |
7ebc05 |
--- a/lrmd/main.c
|
|
 |
7ebc05 |
+++ b/lrmd/main.c
|
|
 |
7ebc05 |
@@ -246,6 +246,7 @@ main(int argc, char **argv)
|
|
 |
7ebc05 |
int rc = 0;
|
|
 |
7ebc05 |
int flag = 0;
|
|
 |
7ebc05 |
int index = 0;
|
|
 |
7ebc05 |
+ const char *option = NULL;
|
|
 |
7ebc05 |
|
|
 |
7ebc05 |
#ifdef ENABLE_PCMK_REMOTE
|
|
 |
7ebc05 |
crm_log_init("pacemaker_remoted", LOG_INFO, TRUE, FALSE, argc, argv, FALSE);
|
|
 |
7ebc05 |
@@ -282,6 +283,20 @@ main(int argc, char **argv)
|
|
 |
7ebc05 |
}
|
|
 |
7ebc05 |
}
|
|
 |
7ebc05 |
|
|
 |
7ebc05 |
+ option = daemon_option("logfacility");
|
|
 |
7ebc05 |
+ if(safe_str_neq(option, "none")) {
|
|
 |
7ebc05 |
+ setenv("HA_LOGFACILITY", option, 1); /* Used by the ocf_log/ha_log OCF macro */
|
|
 |
7ebc05 |
+ }
|
|
 |
7ebc05 |
+
|
|
 |
7ebc05 |
+ option = daemon_option("logfile");
|
|
 |
7ebc05 |
+ if(safe_str_neq(option, "none")) {
|
|
 |
7ebc05 |
+ setenv("HA_LOGFILE", option, 1); /* Used by the ocf_log/ha_log OCF macro */
|
|
 |
7ebc05 |
+
|
|
 |
7ebc05 |
+ if (daemon_option_enabled(crm_system_name, "debug")) {
|
|
 |
7ebc05 |
+ setenv("HA_DEBUGLOG", option, 1); /* Used by the ocf_log/ha_debug OCF macro */
|
|
 |
7ebc05 |
+ }
|
|
 |
7ebc05 |
+ }
|
|
 |
7ebc05 |
+
|
|
 |
7ebc05 |
/* Used by RAs - Leave owned by root */
|
|
 |
7ebc05 |
crm_build_path(CRM_RSCTMP_DIR, 0755);
|
|
 |
7ebc05 |
|