Add support for the full blown versions of sysklogd and klogd

This commit is contained in:
Eric Andersen 2005-09-13 20:58:37 +00:00
parent 23791fa0e6
commit 0eb90feffd
6 changed files with 137 additions and 0 deletions

View File

@ -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"

View File

@ -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/

48
package/sysklogd/init-syslog Executable file
View File

@ -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 $?

View File

@ -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

View File

@ -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>

View File

@ -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 *