Package: syslog-ng
Version: 1.6.5-2
Severity: normal
Tags: patch

Anytime I start/stop/reload I get following errors:

CONSOLE_LOG_LEVEL is of unaccepted value.
KERNEL_RINGBUF_SIZE is of unaccepted value.

It's simply because I don't want to set anything in
/etc/default/syslog-ng. Attached patch fixes this.

Anyway these setting probably should be done only on start/reload and
not on stopping.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.10-dibbler
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages syslog-ng depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  util-linux                  2.12p-2      Miscellaneous system utilities

-- no debconf information
--- syslog-ng.orig      2005-02-21 18:26:09.924130554 +0100
+++ syslog-ng   2005-02-21 18:27:29.144133034 +0100
@@ -16,23 +16,27 @@
 #we source /etc/default/syslog-ng if exists
 [ -r /etc/default/syslog-ng ] && . /etc/default/syslog-ng
 
-case "x$CONSOLE_LOG_LEVEL" in
-       x[0-7])
-               dmesg -n $CONSOLE_LOG_LEVEL
-               ;;
-       *)
-               echo "CONSOLE_LOG_LEVEL is of unaccepted value."
-               ;;
-esac
-
-case "x$KERNEL_RINGBUF_SIZE" in
-       x[0-9]*)
-               dmesg -s $KERNEL_RINGBUF_SIZE
-               ;;
-       *)
-               echo "KERNEL_RINGBUF_SIZE is of unaccepted value."
-               ;;
-esac
+if [ "$CONSOLE_LOG_LEVEL" ] ; then
+    case "x$CONSOLE_LOG_LEVEL" in
+        x[0-7])
+            dmesg -n $CONSOLE_LOG_LEVEL
+            ;;
+        *)
+            echo "CONSOLE_LOG_LEVEL is of unaccepted value."
+            ;;
+    esac
+fi
+
+if [ "$KERNEL_RINGBUF_SIZE" ] ; then
+    case "x$KERNEL_RINGBUF_SIZE" in
+        x[0-9]*)
+            dmesg -s $KERNEL_RINGBUF_SIZE
+            ;;
+        *)
+            echo "KERNEL_RINGBUF_SIZE is of unaccepted value."
+            ;;
+    esac
+fi
 
 # stop syslog-ng before changing its PID file!
 PIDFILE="/var/run/syslog-ng.pid"

Reply via email to