From 01ed05ad8fb9bd1b5ce9050f278dd7d0adb74a5a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 7 Sep 2005 07:42:54 +0000 Subject: added slackware rc script from Chris Elvidge --- NEWS | 2 ++ slackware/Makefile | 1 + slackware/rc.rsyslogd | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ version.h | 4 +-- 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 slackware/Makefile create mode 100755 slackware/rc.rsyslogd diff --git a/NEWS b/NEWS index 8f81467a..44fb124a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +--------------------------------------------------------------------------- +Version 1.0.0 (RGer), 2005-09-12 - changed install doc to cover daily cron scripts - a trouble source --------------------------------------------------------------------------- Version 0.9.8 (RGer), 2005-09-05 diff --git a/slackware/Makefile b/slackware/Makefile new file mode 100644 index 00000000..7ee2460a --- /dev/null +++ b/slackware/Makefile @@ -0,0 +1 @@ +include ../linux/Makefile diff --git a/slackware/rc.rsyslogd b/slackware/rc.rsyslogd new file mode 100755 index 00000000..10a27911 --- /dev/null +++ b/slackware/rc.rsyslogd @@ -0,0 +1,68 @@ +#!/bin/sh +# Start/stop/restart the system logging daemons. +# +# Written for Slackware Linux by Patrick J. Volkerding . +# Modded for rsyslogd by Chris Elvidge Sept 2005 +# + +create_xconsole() +{ + if [ ! -e /dev/xconsole ]; then + mknod -m 640 /dev/xconsole p + else + chmod 0640 /dev/xconsole + fi + chown 0:0 /dev/xconsole +} + +rsyslogd_start() { + if [ -x /usr/sbin/rsyslogd -a -x /usr/sbin/klogd ]; then + echo "Starting rsyslogd / klogd daemons: " +# this one listens on the "usual" socket /dev/log + echo "/usr/sbin/rsyslogd -i $pidfile1" + /usr/sbin/rsyslogd -i "$pidfile1" +# this one listens only to the UDP port + sleep 1 + echo "/usr/sbin/rsyslogd -o -r 0 -f $confile2 -i $pidfile2" + /usr/sbin/rsyslogd -o -r 0 -f "$confile2" -i "$pidfile2" + sleep 1 # prevent syslogd/klogd race condition on SMP kernels + echo "/usr/sbin/klogd -c 3 -x" + # '-c 3' = display level 'error' or higher messages on console + # '-x' = turn off broken EIP translation + /usr/sbin/klogd -c 3 -x + fi +} + +rsyslogd_stop() { + killall rsyslogd 2> /dev/null + killall klogd 2> /dev/null + /usr/bin/rm pidfile1 2> /dev/null + /usr/bin/rm pidfile2 2> /dev/null +} + +rsyslogd_restart() { + rsyslogd_stop + sleep 1 + rsyslogd_start +} + +confile1=/etc/rsyslog.conf +pidfile1=/var/run/rsyslogd.pid + +confile2=/etc/rsyslog.udp.conf +pidfile2=/var/run/rsyslogd.udp.pid + +case "$1" in +'start') + create_xconsole + rsyslogd_start + ;; +'stop') + rsyslogd_stop + ;; +'restart') + rsyslogd_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac diff --git a/version.h b/version.h index 2a53bdba..9160b1a1 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ -#define VERSION "0.9" -#define PATCHLEVEL "8" +#define VERSION "1.0" +#define PATCHLEVEL "0" -- cgit