diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/Config.in | 1 | ||||
-rw-r--r-- | package/sysklogd/Config.in | 7 | ||||
-rwxr-xr-x | package/sysklogd/init-syslog | 48 | ||||
-rw-r--r-- | package/sysklogd/sysklogd.mk | 57 | ||||
-rw-r--r-- | package/sysklogd/sysklogd.patch | 17 | ||||
-rw-r--r-- | package/sysklogd/syslog.conf | 7 |
6 files changed, 137 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in index 588abdc0e..ab0e15b85 100644 --- a/package/Config.in +++ b/package/Config.in @@ -102,6 +102,7 @@ source "package/sfdisk/Config.in" source "package/slang/Config.in" source "package/socat/Config.in" source "package/strace/Config.in" +source "package/sysklogd/Config.in" source "package/tcl/Config.in" source "package/tcpdump/Config.in" source "package/tftpd/Config.in" diff --git a/package/sysklogd/Config.in b/package/sysklogd/Config.in new file mode 100644 index 000000000..369a98fd8 --- /dev/null +++ b/package/sysklogd/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SYSKLOGD + bool "syslogd & klogd" + default n + help + System log daemons syslogd and klogd. + + http://www.infodrom.org/products/sysklogd/ diff --git a/package/sysklogd/init-syslog b/package/sysklogd/init-syslog new file mode 100755 index 000000000..07683ed2f --- /dev/null +++ b/package/sysklogd/init-syslog @@ -0,0 +1,48 @@ +#!/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 $? diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk new file mode 100644 index 000000000..9f18eb839 --- /dev/null +++ b/package/sysklogd/sysklogd.mk @@ -0,0 +1,57 @@ +############################################################# +# +# 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 diff --git a/package/sysklogd/sysklogd.patch b/package/sysklogd/sysklogd.patch new file mode 100644 index 000000000..5178ed377 --- /dev/null +++ b/package/sysklogd/sysklogd.patch @@ -0,0 +1,17 @@ +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> diff --git a/package/sysklogd/syslog.conf b/package/sysklogd/syslog.conf new file mode 100644 index 000000000..318413905 --- /dev/null +++ b/package/sysklogd/syslog.conf @@ -0,0 +1,7 @@ +# /etc/syslog.conf - Configuration file for syslogd + +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none /var/log/messages +user.* /var/log/user.log + +*.emerg * |