home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
rescue
/
etc
/
init.d
/
earlysyslog
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
70 lines
#! /bin/sh
#
# Copyright (c) 1996-2001 SuSE GmbH Nuernberg, Germany.
# Copyright (c) 2002-2003 SuSE Linux AG, Nuernberg, Germany.
#
# Author: Florian La Roche <florian@suse.de>, 1996
# Werner Fink <werner@suse.de>, 1998-2001
#
# /etc/init.d/syslog
#
### BEGIN INIT INFO
# Provides: earlysyslog
# Required-Start:
# Required-Stop:
# Default-Start: 5
# Default-Stop:
# Description: Start the system logging daemons
### END INIT INFO
. /etc/sysconfig/syslog
BINDIR=/sbin
case "$SYSLOG_DAEMON" in
syslog-ng)
syslog=syslog-ng
config=/etc/syslog-ng/syslog-ng.conf
;;
*)
syslog=syslogd
config=/etc/syslog.conf
;;
esac
syslog_bin=${BINDIR}/$syslog
klog_bin=${BINDIR}/klogd
# check config and programs
test -s ${config} || {
echo 1>&2 "${config} does not exist"
if test "$1" == "stop" ; then exit 0 ; else exit 6 ; fi
}
test -x ${syslog_bin} || {
echo 1>&2 "${syslog_bin} is not installed"
if test "$1" == "stop" ; then exit 0 ; else exit 5 ; fi
}
test -x ${klog_bin} || {
echo 1>&2 "${klog_bin} is not installed"
if test "$1" == "stop" ; then exit 0 ; else exit 5 ; fi
}
case "$SYSLOG_DAEMON" in
syslog-ng)
while read line ; do
case "$line" in
\#*|"") continue ;;
*udp\ *|*udp\(*) exit 0 ;;
*tcp\ *|*tcp\(*) exit 0 ;;
esac
done < ${config}
;;
*)
while read select action ; do
case "$select" in \#*|"") continue ;; esac
case "$action" in *@*) exit 0 ;; esac
done < ${config}
;;
esac
exec /etc/init.d/syslog $1 early