summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-01 11:54:55 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-01 11:54:55 +0000
commit727a41859ccce3ffd04d2372d8e23b9c516d01a0 (patch)
treee81246291f33b1ec61ce94175a0c146b37e22674
parentbc354a03db1e41410a92b291d834be784fe55ab5 (diff)
downloadrsyslog-727a41859ccce3ffd04d2372d8e23b9c516d01a0.tar.gz
rsyslog-727a41859ccce3ffd04d2372d8e23b9c516d01a0.tar.xz
rsyslog-727a41859ccce3ffd04d2372d8e23b9c516d01a0.zip
modified rklogd to only change the console log level if -c is specified
-rw-r--r--klogd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/klogd.c b/klogd.c
index 909bc6f8..0a9621a0 100644
--- a/klogd.c
+++ b/klogd.c
@@ -298,7 +298,7 @@ static int kmsg,
terminate = 0,
caught_TSTP = 0,
reload_symbols = 0,
- console_log_level = 6;
+ console_log_level = -1;
static int use_syscall = 0,
one_shot = 0,
@@ -568,7 +568,8 @@ static enum LOGSRC GetKernelLogSrc(void)
auto struct stat sb;
/* Set level of kernel console messaging.. */
- if ( (ksyslog(8, NULL, console_log_level) < 0) && \
+ if ( (console_log_level != -1) &&
+ (ksyslog(8, NULL, console_log_level) < 0) &&
(errno == EINVAL) )
{
/*
@@ -579,7 +580,6 @@ static enum LOGSRC GetKernelLogSrc(void)
*/
Syslog(LOG_WARNING, "Cannot set console log level - disabling "
"console output.");
- ksyslog(6, NULL, 0);
}
/*