[monitoring-plugins] lib/parse_ini.c: Read $MP_CONFIG_FILE
Holger Weiss
git at monitoring-plugins.org
Wed Jun 18 01:40:08 CEST 2014
Module: monitoring-plugins
Branch: master
Commit: fbe13d8f32dc0e3bb76e32ee690e6f15bcafb0f5
Author: Holger Weiss <holger at zedat.fu-berlin.de>
Date: Wed Jun 18 00:47:35 2014 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=fbe13d8
lib/parse_ini.c: Read $MP_CONFIG_FILE
Read $MP_CONFIG_FILE if that variable is set in the environment.
---
lib/parse_ini.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/parse_ini.c b/lib/parse_ini.c
index e19af1b..f352d78 100644
--- a/lib/parse_ini.c
+++ b/lib/parse_ini.c
@@ -339,7 +339,8 @@ static char *default_file_in_path(void){
static char *default_file(void){
char **p, *ini_file;
- if((ini_file=default_file_in_path())!=NULL)
+ if((ini_file=getenv("MP_CONFIG_FILE"))!=NULL ||
+ (ini_file=default_file_in_path())!=NULL)
return ini_file;
for(p=default_ini_path_names; *p!=NULL; p++)
if (access(*p, F_OK)==0)
More information about the Commits
mailing list