[Techtalk] Hiding/redirecting console messages
Val Henson
val at nmt.edu
Sun Jul 21 21:19:07 EST 2002
On Sun, Jul 21, 2002 at 06:40:04PM -0700, Nicole Zimmerman wrote:
>
> > What you're looking for is klogd. The man page will tell most of what
> > you need to know ("man klogd" for our listeners) but to prevent -all-
> > kernel messages from going to the console, you would edit (or create)
> > /etc/conf/syslog and add a line like so:
> >
> > KLOGD_OPTIONS="-2 -c 0"
>
> Actually, in debian, this is done in the init script directly.
>
> Edit /etc/init.d/klogd
>
> Change the line:
>
> KLOGD=""
>
> to contain your options. I had to make the same change for a released
> piece of harware. I didn't want the customer to freak out when it said
> "setting promiscuous mode". ;o)
Thanks, I forgot the Debian part. :) Actually, I guess I should have
said how I figured out where to make the changes on my (Redhat)
system. I knew it had to be in /etc/init.d/, since that's where the
init scripts are, so I did:
val at evilcat <~>$ grep -r klogd /etc/init.d
/etc/init.d/syslog:# syslog Starts syslogd/klogd.
/etc/init.d/syslog:[ -f /sbin/klogd ] || exit 0
/etc/init.d/syslog: daemon klogd $KLOGD_OPTIONS
/etc/init.d/syslog: killproc klogd
/etc/init.d/syslog: status klogd
And looking at /etc/init.d/syslog, I could either have directly edited
the line that set KLOGD_OPTIONS in that file or, since it sourced
/etc/conf/syslog, I could set KLOGD_OPTIONS in there. I prefer to not
edit init scripts when possible, so I chose to edit /etc/conf/syslog,
since that's where configuration should logically be done anyway.
-VAL
More information about the Techtalk
mailing list