--- /dev/null
+#!/bin/sh
+#
+# Starts syslog.
+#
+
+
+
+umask 077
+
+start() {
+ echo -n "Starting syslogd: "
+ start-stop-daemon --start --quiet --pidfile /var/run/syslog.pid --exec /sbin/syslogd -- -m 0
+ echo "OK"
+
+ echo -n "Starting klogd: "
+ start-stop-daemon --start --quiet --pidfile /var/run/klogd.pid --exec /sbin/klogd
+ echo "OK"
+}
+stop() {
+ echo -n "Stopping klogd: "
+ start-stop-daemon --stop --name klogd
+ echo "OK"
+
+ echo -n "Stopping syslogd: "
+ start-stop-daemon --stop --name syslogd
+ echo "OK"
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
--- /dev/null
+#############################################################
+#
+# sysklogd
+#
+#############################################################
+SYSKLOGD_VER:=1.4.1
+SYSKLOGD_SOURCE:=sysklogd-$(SYSKLOGD_VER).tar.gz
+SYSKLOGD_SITE:=http://www.infodrom.org/projects/sysklogd/download
+SYSKLOGD_DIR:=$(BUILD_DIR)/sysklogd-$(SYSKLOGD_VER)
+SYSKLOGD_SYSLOGD_BINARY:=syslogd
+SYSKLOGD_KLOGD_BINARY:=klogd
+SYSKLOGD_BINARY:=$(SYSKLOGD_KLOGD_BINARY)
+SYSKLOGD_SYSLOGD_TARGET_BINARY:=sbin/syslogd
+SYSKLOGD_KLOGD_TARGET_BINARY:=sbin/klogd
+SYSKLOGD_TARGET_BINARY:=$(SYSKLOGD_KLOGD_TARGET_BINARY)
+
+$(DL_DIR)/$(SYSKLOGD_SOURCE):
+ $(WGET) -P $(DL_DIR) $(SYSKLOGD_SITE)/$(SYSKLOGD_SOURCE)
+
+sysklogd-source: $(DL_DIR)/$(SYSKLOGD_SOURCE)
+
+$(SYSKLOGD_DIR)/.unpacked: $(DL_DIR)/$(SYSKLOGD_SOURCE)
+ zcat $(DL_DIR)/$(SYSKLOGD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(SYSKLOGD_DIR) package/sysklogd/ sysklogd\*.patch
+ touch $(SYSKLOGD_DIR)/.unpacked
+
+$(SYSKLOGD_DIR)/$(SYSKLOGD_BINARY): $(SYSKLOGD_DIR)/.unpacked
+ $(MAKE) CC=$(TARGET_CC) -C $(SYSKLOGD_DIR)
+ $(STRIP) $(SYSKLOGD_DIR)/$(SYSKLOGD_SYSLOGD_BINARY)
+ $(STRIP) $(SYSKLOGD_DIR)/$(SYSKLOGD_KLOGD_BINARY)
+
+$(TARGET_DIR)/$(SYSKLOGD_TARGET_BINARY): $(SYSKLOGD_DIR)/$(SYSKLOGD_BINARY)
+ $(INSTALL) -m 0755 -D $(SYSKLOGD_DIR)/$(SYSKLOGD_SYSLOGD_BINARY) $(TARGET_DIR)/$(SYSKLOGD_SYSLOGD_TARGET_BINARY)
+ $(INSTALL) -m 0755 -D $(SYSKLOGD_DIR)/$(SYSKLOGD_KLOGD_BINARY) $(TARGET_DIR)/$(SYSKLOGD_KLOGD_TARGET_BINARY)
+ $(INSTALL) -m 0755 -D package/sysklogd/init-syslog $(TARGET_DIR)/etc/init.d/S25syslog
+ $(INSTALL) -m 0644 -D package/sysklogd/syslog.conf $(TARGET_DIR)/etc/syslog.conf
+
+sysklogd: uclibc $(TARGET_DIR)/$(SYSKLOGD_TARGET_BINARY)
+
+sysklogd-clean:
+ rm -f $(TARGET_DIR)/$(SYSKLOGD_SYSLOGD_TARGET_BINARY)
+ rm -f $(TARGET_DIR)/$(SYSKLOGD_KLOGD_TARGET_BINARY)
+ rm -f $(TARGET_DIR)/etc/init.d/S25syslogd
+ rm -f $(TARGET_DIR)/etc/syslog.conf
+ -$(MAKE) -C $(SYSKLOGD_DIR) clean
+
+sysklogd-dirclean:
+ rm -rf $(SYSKLOGD_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_SYSKLOGD)),y)
+TARGETS+=sysklogd
+endif
--- /dev/null
+On MIPS architecture, sysklogd fails to compile because linux/module.h
+depends on asmlinkage, which is defined linux/linkage.h.
+
+The "proper" fix to this would probably be to apply the
+mips-fixed-fls-warning.patch to the linux sources, which patches
+asm-mips/system.h to always include linux/linkage.h.
+
+--- sysklogd-1.4.1/ksym_mod.c.orig 2000-09-12 14:15:28.000000000 -0700
++++ sysklogd-1.4.1/ksym_mod.c 2005-08-15 14:11:42.000000000 -0700
+@@ -89,6 +89,7 @@
+ #include <errno.h>
+ #include <sys/fcntl.h>
+ #include <sys/stat.h>
++#include <linux/linkage.h>
+ #if !defined(__GLIBC__)
+ #include <linux/time.h>
+ #include <linux/module.h>