summaryrefslogtreecommitdiffstats
path: root/sysklogd
diff options
context:
space:
mode:
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/.footprint27
-rw-r--r--sysklogd/.md5sum5
-rw-r--r--sysklogd/Pkgfile25
-rw-r--r--sysklogd/Pkgfile.old33
-rwxr-xr-xsysklogd/rotatelog27
-rw-r--r--sysklogd/sysklogd23
-rwxr-xr-xsysklogd/syslog13
-rw-r--r--sysklogd/syslog.conf13
8 files changed, 166 insertions, 0 deletions
diff --git a/sysklogd/.footprint b/sysklogd/.footprint
new file mode 100644
index 0000000..cb67b2c
--- /dev/null
+++ b/sysklogd/.footprint
@@ -0,0 +1,27 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/cron/
+drwxr-xr-x root/root etc/cron/weekly/
+-rwxr-xr-x root/root etc/cron/weekly/syslog
+drwxr-xr-x root/root etc/rc.d/
+-rwxr-xr-x root/root etc/rc.d/sysklogd
+-rw-r--r-- root/root etc/syslog.conf
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/man/
+drwxr-xr-x root/root usr/man/man5/
+-rw-r--r-- root/root usr/man/man5/syslog.conf.5.gz
+drwxr-xr-x root/root usr/man/man8/
+-rw-r--r-- root/root usr/man/man8/klogd.8.gz
+-rw-r--r-- root/root usr/man/man8/sysklogd.8.gz
+-rw-r--r-- root/root usr/man/man8/syslogd.8.gz
+drwxr-xr-x root/root usr/sbin/
+-rwx------ root/root usr/sbin/klogd
+-rwxr-xr-x root/root usr/sbin/rotatelog
+-rwx------ root/root usr/sbin/syslogd
+drwxr-xr-x root/root var/
+drwxr-xr-x root/root var/log/
+-rw-r----- root/root var/log/auth (EMPTY)
+-rw-r----- root/root var/log/cron (EMPTY)
+-rw-r----- root/root var/log/debug (EMPTY)
+-rw-r----- root/root var/log/kernel (EMPTY)
+-rw-r----- root/root var/log/mail (EMPTY)
+-rw-r----- root/root var/log/messages (EMPTY)
diff --git a/sysklogd/.md5sum b/sysklogd/.md5sum
new file mode 100644
index 0000000..22a97ef
--- /dev/null
+++ b/sysklogd/.md5sum
@@ -0,0 +1,5 @@
+b379693c8b89c99994e58efd49f98a71 rotatelog
+a1bb71ed6b0ce791cb7f9fa0089a09ef sysklogd
+e053094e8103165f98ddafe828f6ae4b sysklogd-1.5.tar.gz
+844e5e75944beb8cf4f39a0535e56ba4 syslog
+f8d478b8d60c1d3879f4a10a955db6e5 syslog.conf
diff --git a/sysklogd/Pkgfile b/sysklogd/Pkgfile
new file mode 100644
index 0000000..67fe33e
--- /dev/null
+++ b/sysklogd/Pkgfile
@@ -0,0 +1,25 @@
+description="Kernel and system logging daemons"
+packager=""
+maintainer="CRUX System Team, core-ports at crux dot nu"
+url="http://www.infodrom.org/projects/sysklogd/"
+depends=()
+
+name=sysklogd
+version=1.5
+release=4
+source=(http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-1.5.tar.gz rotatelog syslog syslog.conf sysklogd)
+build ()
+{
+ cd $name-$version;
+ sed -i -e '192d' ksym_mod.c;
+ mkdir -p $PKG/usr/sbin $PKG/etc/{cron/weekly,rc.d} $PKG/var/log $PKG/usr/man/{man5,man8};
+ make RPM_OPT_FLAGS="$CFLAGS" all;
+ make BINDIR=$PKG/usr/sbin MANDIR=$PKG/usr/man install;
+ install -m 755 $SRC/rotatelog $PKG/usr/sbin;
+ install -m 755 $SRC/syslog $PKG/etc/cron/weekly;
+ install -m 644 $SRC/syslog.conf $PKG/etc;
+ install -m 755 $SRC/sysklogd $PKG/etc/rc.d;
+ chmod -R +w $PKG;
+ touch $PKG/var/log/{messages,auth,mail,cron,kernel,debug};
+ chmod 640 $PKG/var/log/{messages,auth,mail,cron,kernel,debug}
+}
diff --git a/sysklogd/Pkgfile.old b/sysklogd/Pkgfile.old
new file mode 100644
index 0000000..9f6181e
--- /dev/null
+++ b/sysklogd/Pkgfile.old
@@ -0,0 +1,33 @@
+# Description: Kernel and system logging daemons
+# URL: http://www.infodrom.org/projects/sysklogd/
+# Maintainer: CRUX System Team, core-ports at crux dot nu
+
+name=sysklogd
+version=1.5
+release=4
+source=(http://www.ibiblio.org/pub/Linux/system/daemons/$name-$version.tar.gz \
+ rotatelog syslog syslog.conf sysklogd)
+
+build() {
+ cd $name-$version
+
+ # don't try to fclose(NULL)
+ sed -i -e '192d' ksym_mod.c
+
+ mkdir -p $PKG/usr/sbin \
+ $PKG/etc/{cron/weekly,rc.d} \
+ $PKG/var/log \
+ $PKG/usr/man/{man5,man8}
+
+ make RPM_OPT_FLAGS="$CFLAGS" all
+ make BINDIR=$PKG/usr/sbin MANDIR=$PKG/usr/man install
+
+ install -m 755 $SRC/rotatelog $PKG/usr/sbin
+ install -m 755 $SRC/syslog $PKG/etc/cron/weekly
+ install -m 644 $SRC/syslog.conf $PKG/etc
+ install -m 755 $SRC/sysklogd $PKG/etc/rc.d
+
+ chmod -R +w $PKG
+ touch $PKG/var/log/{messages,auth,mail,cron,kernel,debug}
+ chmod 640 $PKG/var/log/{messages,auth,mail,cron,kernel,debug}
+}
diff --git a/sysklogd/rotatelog b/sysklogd/rotatelog
new file mode 100755
index 0000000..7ecb623
--- /dev/null
+++ b/sysklogd/rotatelog
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# /usr/sbin/rotatelog: rotate logfile
+#
+
+if [ "$1" = "" ]; then
+ echo "usage : `basename $0` <logfile>"
+ exit 1
+fi
+
+if [ ! -f /var/log/$1 ]; then
+ echo "`basename $0`: /var/log/$1 not found"
+ exit 1
+fi
+
+[ -f /var/log/old/$1.9 ] && rm /var/log/old/$1.9
+[ -f /var/log/old/$1.8 ] && mv /var/log/old/$1.8 /var/log/old/$1.9
+[ -f /var/log/old/$1.7 ] && mv /var/log/old/$1.7 /var/log/old/$1.8
+[ -f /var/log/old/$1.6 ] && mv /var/log/old/$1.6 /var/log/old/$1.7
+[ -f /var/log/old/$1.5 ] && mv /var/log/old/$1.5 /var/log/old/$1.6
+[ -f /var/log/old/$1.4 ] && mv /var/log/old/$1.4 /var/log/old/$1.5
+[ -f /var/log/old/$1.3 ] && mv /var/log/old/$1.3 /var/log/old/$1.4
+[ -f /var/log/old/$1.2 ] && mv /var/log/old/$1.2 /var/log/old/$1.3
+[ -f /var/log/old/$1.1 ] && mv /var/log/old/$1.1 /var/log/old/$1.2
+[ -f /var/log/$1 ] && (cp /var/log/$1 /var/log/old/$1.1; echo -n "" > /var/log/$1)
+
+# End of file
diff --git a/sysklogd/sysklogd b/sysklogd/sysklogd
new file mode 100644
index 0000000..9d43d19
--- /dev/null
+++ b/sysklogd/sysklogd
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# /etc/rc.d/sysklogd: start/stop sysklogd logging daemons
+#
+
+case $1 in
+start)
+ /usr/sbin/syslogd
+ /usr/sbin/klogd -c 4
+ ;;
+stop)
+ /usr/bin/killall syslogd
+ /usr/bin/killall klogd
+ ;;
+restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+*)
+ echo "usage: $0 [start|stop|restart]"
+ ;;
+esac
diff --git a/sysklogd/syslog b/sysklogd/syslog
new file mode 100755
index 0000000..5da248d
--- /dev/null
+++ b/sysklogd/syslog
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# /etc/cron/weekly/syslog: rotate log files
+#
+
+/usr/sbin/rotatelog auth
+/usr/sbin/rotatelog cron
+/usr/sbin/rotatelog debug
+/usr/sbin/rotatelog kernel
+/usr/sbin/rotatelog mail
+/usr/sbin/rotatelog messages
+
+# End of file
diff --git a/sysklogd/syslog.conf b/sysklogd/syslog.conf
new file mode 100644
index 0000000..1851b98
--- /dev/null
+++ b/sysklogd/syslog.conf
@@ -0,0 +1,13 @@
+#
+# /etc/syslog.conf
+#
+
+*.emerg *
+kern.* /var/log/kernel
+authpriv,auth.info /var/log/auth
+mail.info /var/log/mail
+cron.info /var/log/cron
+*.info;authpriv,auth,mail,cron,kern.none /var/log/messages
+*.=debug;kern.none /var/log/debug
+
+# End of file