summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-16 16:58:15 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-16 16:58:15 +0200
commitc5178a4d21cf8ca3362b8a8394d0e762801550a4 (patch)
tree0916303e0cd18e00397a6eb28a64b32aa5908c4d /modules.c
parent65cdfc1777e1c189f28dfe11fa1ab0d08930b458 (diff)
parent11a526bcee95dab6a5bf2cc25a07dc6d65eaa177 (diff)
downloadrsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.tar.gz
rsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.tar.xz
rsyslog-c5178a4d21cf8ca3362b8a8394d0e762801550a4.zip
Merge branch 'master' into beta
3.17.x is the new beta Conflicts: ChangeLog configure.ac
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules.c b/modules.c
index 57df48b1..32a71c0c 100644
--- a/modules.c
+++ b/modules.c
@@ -39,6 +39,9 @@
#include <time.h>
#include <assert.h>
#include <errno.h>
+#ifdef OS_BSD
+# include "libgen.h"
+#endif
#include <dlfcn.h> /* TODO: replace this with the libtools equivalent! */
@@ -780,6 +783,17 @@ BEGINAbstractObjClassInit(module, 1, OBJ_IS_CORE_MODULE) /* class, version - CHA
SetModDir(pModPath);
}
+ /* now check if another module path was set via the command line (-M)
+ * if so, that overrides the environment. Please note that we must use
+ * a global setting here because the command line parser can NOT call
+ * into the module object, because it is not initialized at that point. So
+ * instead a global setting is changed and we pick it up as soon as we
+ * initialize -- rgerhards, 2008-04-04
+ */
+ if(glblModPath != NULL) {
+ SetModDir(glblModPath);
+ }
+
/* request objects we use */
CHKiRet(objUse(errmsg, CORE_COMPONENT));
ENDObjClassInit(module)