diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-06-18 00:47:35 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-06-18 00:47:35 +0200 |
commit | fbe13d8f32dc0e3bb76e32ee690e6f15bcafb0f5 (patch) | |
tree | 1e90414b7d1ac1f5ceb9506961f578055f593a2c | |
parent | f94e95785cb15a0028be40019848ec05a8e208a8 (diff) | |
download | monitoring-plugins-fbe13d8.tar.gz |
lib/parse_ini.c: Read $MP_CONFIG_FILE
Read $MP_CONFIG_FILE if that variable is set in the environment.
-rw-r--r-- | lib/parse_ini.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/parse_ini.c b/lib/parse_ini.c index e19af1bb..f352d78c 100644 --- a/lib/parse_ini.c +++ b/lib/parse_ini.c | |||
@@ -339,7 +339,8 @@ static char *default_file_in_path(void){ | |||
339 | static char *default_file(void){ | 339 | static char *default_file(void){ |
340 | char **p, *ini_file; | 340 | char **p, *ini_file; |
341 | 341 | ||
342 | if((ini_file=default_file_in_path())!=NULL) | 342 | if((ini_file=getenv("MP_CONFIG_FILE"))!=NULL || |
343 | (ini_file=default_file_in_path())!=NULL) | ||
343 | return ini_file; | 344 | return ini_file; |
344 | for(p=default_ini_path_names; *p!=NULL; p++) | 345 | for(p=default_ini_path_names; *p!=NULL; p++) |
345 | if (access(*p, F_OK)==0) | 346 | if (access(*p, F_OK)==0) |