Henrique de Moraes Holschuh wrote:

On Fri, 17 Dec 2004, Robert Vangel wrote:


I know it is caused by iptables, but I can't seem to figure out how to


AND by the (IMHO completely braindead) default console level set by klogd.



them going to /var/log/messages and not the console.



Edit /etc/init.d/klogd, and add "-c 4" to the klogd options.



That didn't fix it, unfortunately. Here's what /etc/init.d/klogd looks like:


#! /bin/sh # /etc/init.d/klogd: start the kernel log daemon.

PATH=/bin:/usr/bin:/sbin:/usr/sbin

pidfile=/var/run/klogd.pid
binpath=/sbin/klogd

test -f $binpath || exit 0

#  Use KLOGD="-k /boot/System.map-$(uname -r)" to specify System.map
#
# KLOGD=""
KLOGD="-c 4"

running()
{
   # No pidfile, probably no daemon present
   #
   if [ ! -f $pidfile ]
   then
       return 1
   fi

   pid=`cat $pidfile`

   # No pid, probably no daemon present
   #
   if [ -z "$pid" ]
   then
       return 1
   fi

   cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -1`

   # No syslogd?
   #
   if [ "$cmd" != "$binpath" ]
   then
       return 1
   fi

   return 0
}

case "$1" in
start)
echo -n "Starting kernel log daemon: klogd"
start-stop-daemon --start --quiet --exec $binpath -- $KLOGD
echo "."
;;
stop)
echo -n "Stopping kernel log daemon: klogd"
start-stop-daemon --stop --quiet --exec $binpath --pidfile $pidfile
echo "."
;;
restart|force-reload)
echo -n "Stopping kernel log daemon: klogd"
start-stop-daemon --stop --quiet --exec $binpath --pidfile $pidfile
echo "."
sleep 1
echo -n "Starting kernel log daemon: klogd"
start-stop-daemon --start --quiet --exec $binpath --exec $binpath -- $KLOGD
echo "."
;;
reload-or-restart)
if running
then
start-stop-daemon --stop --quiet --signal 1 --exec $binpath --pidfile $pidfile
else
start-stop-daemon --start --quiet --exec $binpath -- $KLOGD
fi
;;
*)
echo "Usage: /etc/init.d/klogd {start|stop|restart|force-reload|reload-or-restart}"
exit 1
esac


exit 0


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to