projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectd(1): Add some references to collectd-snmp(5).
[collectd.git]
/
src
/
collectd.c
diff --git
a/src/collectd.c
b/src/collectd.c
index
f8f2fcc
..
4fbd5c0
100644
(file)
--- a/
src/collectd.c
+++ b/
src/collectd.c
@@
-23,9
+23,9
@@
#include "collectd.h"
#include "common.h"
#include "collectd.h"
#include "common.h"
-#include "network.h"
#include "plugin.h"
#include "configfile.h"
#include "plugin.h"
#include "configfile.h"
+#include "types_list.h"
/*
* Global variables
/*
* Global variables
@@
-214,6
+214,7
@@
static int do_init (void)
}
#endif
}
#endif
+ read_types_list ();
plugin_init_all ();
return (0);
plugin_init_all ();
return (0);
@@
-319,6
+320,7
@@
int main (int argc, char **argv)
struct sigaction sigIntAction;
struct sigaction sigTermAction;
char *configfile = CONFIGFILE;
struct sigaction sigIntAction;
struct sigaction sigTermAction;
char *configfile = CONFIGFILE;
+ int test_config = 0;
const char *basedir;
#if COLLECT_DAEMON
struct sigaction sigChldAction;
const char *basedir;
#if COLLECT_DAEMON
struct sigaction sigChldAction;
@@
-331,7
+333,7
@@
int main (int argc, char **argv)
{
int c;
{
int c;
- c = getopt (argc, argv, "hC:"
+ c = getopt (argc, argv, "h
t
C:"
#if COLLECT_DAEMON
"fP:"
#endif
#if COLLECT_DAEMON
"fP:"
#endif
@@
-345,6
+347,9
@@
int main (int argc, char **argv)
case 'C':
configfile = optarg;
break;
case 'C':
configfile = optarg;
break;
+ case 't':
+ test_config = 1;
+ break;
#if COLLECT_DAEMON
case 'P':
global_option_set ("PIDFile", optarg);
#if COLLECT_DAEMON
case 'P':
global_option_set ("PIDFile", optarg);
@@
-396,6
+401,9
@@
int main (int argc, char **argv)
if (init_global_variables () != 0)
return (1);
if (init_global_variables () != 0)
return (1);
+ if (test_config)
+ return (0);
+
#if COLLECT_DAEMON
/*
* fork off child
#if COLLECT_DAEMON
/*
* fork off child