diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-26 17:30:59 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-26 17:30:59 +0200 |
commit | 19c8bed08dbeb9ce0313ec92d7de85c9c51c4f48 (patch) | |
tree | 625acfbc535b2b84e0f4cfaf8ee322f38f0bbc2b /tools/syslogd.c | |
parent | 8fb8c0d37b68d633e562bbc96f9971917620d181 (diff) | |
download | rsyslog-19c8bed08dbeb9ce0313ec92d7de85c9c51c4f48.tar.gz rsyslog-19c8bed08dbeb9ce0313ec92d7de85c9c51c4f48.tar.bz2 rsyslog-19c8bed08dbeb9ce0313ec92d7de85c9c51c4f48.zip |
step: outchannel list integrated into main config object
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r-- | tools/syslogd.c | 61 |
1 files changed, 20 insertions, 41 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index 63eb55b9..318031a1 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -1280,23 +1280,6 @@ finalize_it: } -/* print debug information as part of init(). This pretty much - * outputs the whole config of rsyslogd. I've moved this code - * out of init() to clean it somewhat up. - * rgerhards, 2007-07-31 - */ -static void dbgPrintInitInfo(void) -{ - dbgprintf("The following is the old-style, to-be-replaced, current config dump at the end " - " of the config load process ;)\n"); - ochPrintList(); - - DBGPRINTF("Messages with malicious PTR DNS Records are %sdropped.\n", - glbl.GetDropMalPTRMsgs() ? "" : "not "); - -} - - /* Actually run the input modules. This happens after privileges are dropped, * if that is requested. */ @@ -1441,31 +1424,31 @@ init(void) * If not, terminate. -- rgerhards, 2008-07-25 */ if(iConfigVerify) { - if(bHadConfigErr) { - /* a bit dirty, but useful... */ - exit(1); - } - ABORT_FINALIZE(RS_RET_VALIDATION_RUN); + if(bHadConfigErr) { + /* a bit dirty, but useful... */ + exit(1); } + ABORT_FINALIZE(RS_RET_VALIDATION_RUN); +} #warning restructure following if to use return value of loadConf - if(loadConf->globals.bAbortOnUncleanConfig && bHadConfigErr) { - fprintf(stderr, "rsyslogd: $AbortOnUncleanConfig is set, and config is not clean.\n" - "Check error log for details, fix errors and restart. As a last\n" - "resort, you may want to remove $AbortOnUncleanConfig to permit a\n" - "startup with a dirty config.\n"); - exit(2); - } +if(loadConf->globals.bAbortOnUncleanConfig && bHadConfigErr) { + fprintf(stderr, "rsyslogd: $AbortOnUncleanConfig is set, and config is not clean.\n" + "Check error log for details, fix errors and restart. As a last\n" + "resort, you may want to remove $AbortOnUncleanConfig to permit a\n" + "startup with a dirty config.\n"); + exit(2); +} - /* create message queue */ - CHKiRet_Hdlr(createMainQueue(&pMsgQueue, UCHAR_CONSTANT("main Q"))) { - /* no queue is fatal, we need to give up in that case... */ - fprintf(stderr, "fatal error %d: could not create message queue - rsyslogd can not run!\n", iRet); - exit(1); - } +/* create message queue */ +CHKiRet_Hdlr(createMainQueue(&pMsgQueue, UCHAR_CONSTANT("main Q"))) { + /* no queue is fatal, we need to give up in that case... */ + fprintf(stderr, "fatal error %d: could not create message queue - rsyslogd can not run!\n", iRet); + exit(1); +} - bHaveMainQueue = (ourConf->globals.mainQ.MainMsgQueType == QUEUETYPE_DIRECT) ? 0 : 1; - DBGPRINTF("Main processing queue is initialized and running\n"); +bHaveMainQueue = (ourConf->globals.mainQ.MainMsgQueType == QUEUETYPE_DIRECT) ? 0 : 1; +DBGPRINTF("Main processing queue is initialized and running\n"); /* the output part and the queue is now ready to run. So it is a good time * to initialize the inputs. Please note that the net code above should be @@ -1477,10 +1460,6 @@ init(void) */ startInputModules(); - if(Debug) { - dbgPrintInitInfo(); - } - memset(&sigAct, 0, sizeof (sigAct)); sigemptyset(&sigAct.sa_mask); sigAct.sa_handler = sighup_handler; |