]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox: enable dropping of duplicates in syslog, off by default
authorJoshua Lock <josh@linux.intel.com>
Wed, 11 Jan 2012 19:06:19 +0000 (11:06 -0800)
committerSaul Wold <sgw@linux.intel.com>
Thu, 19 Jan 2012 09:16:28 +0000 (01:16 -0800)
Busybox syslog includes functionality to drop duplicated syslog entries,
enable this feature in the defconfig yet disable it by default.

Expose configuration of the feature through the syslog-startup.conf file
and the syslog init script.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/recipes-core/busybox/busybox-1.19.3/defconfig
meta/recipes-core/busybox/busybox_1.19.3.bb
meta/recipes-core/busybox/files/syslog
meta/recipes-core/busybox/files/syslog-startup.conf

index ebd751d748a9868d80ba3f60b973598350c4f335..b474ad408707f8e775ed84731fdc318911e7dd8f 100644 (file)
@@ -997,7 +997,7 @@ CONFIG_FEATURE_SH_HISTFILESIZE=y
 CONFIG_SYSLOGD=y
 CONFIG_FEATURE_ROTATE_LOGFILE=y
 CONFIG_FEATURE_REMOTE_LOG=y
-# CONFIG_FEATURE_SYSLOGD_DUP is not set
+CONFIG_FEATURE_SYSLOGD_DUP=y
 CONFIG_FEATURE_SYSLOGD_CFG=y
 CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
 CONFIG_FEATURE_IPC_SYSLOG=y
index f591856a367e2b21316a7c67bee905170c32c972..a0754071d94586b341c3fa467444f32cda8688a6 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://udhcpscript.patch \
index deeea8ba650b83210ed940e7252240a97bcfe588..2944d3d06c392579b35f698861e9c229259612a2 100644 (file)
@@ -40,6 +40,9 @@ if [ -f /etc/syslog-startup.conf ]; then
        if [ "$REDUCE" = "yes" ]; then
                SYSLOG_ARGS="$SYSLOG_ARGS -S"
        fi
+       if [ "$DROPDUPLICATES" = "yes" ]; then
+           SYSLOG_ARGS="$SYSLOG_ARGS -D"
+       fi
        if [ -n "$LOGLEVEL" ]; then
            SYSLOG_ARGS="$SYSLOG_ARGS -l $LOGLEVEL"
        fi
index 553490bd7d03d3b1caa3f6c6d88a713f83019e97..fda450aa0d79b6f7d746cac78a4498a116e94e68 100644 (file)
@@ -5,6 +5,7 @@ DESTINATION=file                # log destinations (buffer file remote)
 LOGFILE=/var/log/messages      # where to log (file)
 REMOTE=loghost:514             # where to log (syslog remote)
 REDUCE=no                      # reduce-size logging
+DROPDUPLICATES=no              # whether to drop duplicate log entries
 #ROTATESIZE=0                  # rotate log if grown beyond X [kByte]
 #ROTATEGENS=3                  # keep X generations of rotated logs
 BUFFERSIZE=64                  # size of circular buffer [kByte]