.
OBS-URL: https://build.opensuse.org/package/show/Base:System/syslogd?expand=0&rev=20
This commit is contained in:
parent
c2efc3f858
commit
54e4127d72
76
rc.syslog
76
rc.syslog
@ -6,8 +6,8 @@
|
||||
#
|
||||
# Author: Florian La Roche <florian@suse.de>, 1996
|
||||
# Werner Fink <werner@suse.de>, 1998-2008
|
||||
# Stephan Kulow <coolo@suse.de>, 2005-2008
|
||||
# Marius Tomaschewski <mt@suse.de>, 2001-2008
|
||||
# Stephan Kulow <coolo@suse.de>, 2005-2008
|
||||
# Marius Tomaschewski <mt@suse.de>, 2001-2008
|
||||
#
|
||||
# /etc/init.d/syslog
|
||||
#
|
||||
@ -29,9 +29,9 @@ BINDIR=/sbin
|
||||
# update $SYSLOG_DAEMON if not up-to-date
|
||||
test -n "$SYSLOG_DAEMON" && \
|
||||
test -x "${BINDIR}/$SYSLOG_DAEMON" || {
|
||||
for SYSLOG_DAEMON in rsyslogd syslog-ng syslogd ; do
|
||||
test -x "${BINDIR}/$SYSLOG_DAEMON" && break
|
||||
done
|
||||
for SYSLOG_DAEMON in rsyslogd syslog-ng syslogd ; do
|
||||
test -x "${BINDIR}/$SYSLOG_DAEMON" && break
|
||||
done
|
||||
}
|
||||
|
||||
# set daemon dependent variables
|
||||
@ -52,8 +52,8 @@ case "$SYSLOG_DAEMON" in
|
||||
while read one two rest ; do
|
||||
test "x$one" = 'x$ModLoad' && \
|
||||
test "x$two" = 'ximklog.so' && {
|
||||
start_klogd=no
|
||||
break
|
||||
start_klogd=no
|
||||
break
|
||||
}
|
||||
done < $config
|
||||
;;
|
||||
@ -61,7 +61,7 @@ case "$SYSLOG_DAEMON" in
|
||||
syslog=syslog-ng
|
||||
config=/etc/syslog-ng/syslog-ng.conf
|
||||
params="$SYSLOG_NG_PARAMS"
|
||||
ngsocks="/var/run/syslog-ng/additional-log-sockets.conf"
|
||||
ngsocks="/var/run/syslog-ng/additional-log-sockets.conf"
|
||||
;;
|
||||
*)
|
||||
syslog=syslogd
|
||||
@ -116,7 +116,7 @@ case "$1" in
|
||||
# Syslog service already done
|
||||
rm -f /var/lock/subsys/earlysyslog
|
||||
case "$SYSLOG_DAEMON" in
|
||||
rsyslogd) ;; # switch to normal config
|
||||
rsyslogd) ;; # switch to normal config
|
||||
*) exit 0 ;;
|
||||
esac
|
||||
elif test "$2" = "early" ; then
|
||||
@ -137,39 +137,39 @@ case "$1" in
|
||||
echo -n "Starting syslog services"
|
||||
test -z "$KERNEL_LOGLEVEL" && KERNEL_LOGLEVEL=1
|
||||
|
||||
case $syslog in
|
||||
(rsyslogd)
|
||||
if [ "x$rsocks" != x ] ; then
|
||||
rm -f "$rsocks"
|
||||
touch "$rsocks"
|
||||
fi
|
||||
;;
|
||||
(syslog-ng)
|
||||
case $syslog in
|
||||
rsyslogd)
|
||||
if test -n "$rsocks" ; then
|
||||
rm -f "$rsocks"
|
||||
touch "$rsocks"
|
||||
fi
|
||||
;;
|
||||
syslog-ng)
|
||||
echo 'source chroots{' > "$ngsocks"
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
# add additional sockets to params or similar
|
||||
for variable in ${!SYSLOGD_ADDITIONAL_SOCKET*}; do
|
||||
eval value=\$$variable
|
||||
test -n "${value}" && test -d ${value%/*} && {
|
||||
case $syslog in
|
||||
rsyslogd)
|
||||
if [ "x$rsocks" != x ] ; then
|
||||
echo "\$AddUnixListenSocket $value" >> "$rsocks"
|
||||
fi
|
||||
;;
|
||||
case $syslog in
|
||||
rsyslogd)
|
||||
if test -n "$rsocks" ; then
|
||||
echo "\$AddUnixListenSocket $value" >> "$rsocks"
|
||||
fi
|
||||
;;
|
||||
syslog-ng)
|
||||
echo "unix-dgram(\"$value\");" >> "$ngsocks"
|
||||
;;
|
||||
*)
|
||||
params="$params -a $value"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
params="$params -a $value"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
done
|
||||
case $syslog in
|
||||
syslog-ng)
|
||||
echo "};" >> "$ngsocks"
|
||||
syslog-ng)
|
||||
echo "};" >> "$ngsocks"
|
||||
;;
|
||||
esac
|
||||
startproc -p ${syslog_pid} ${syslog_bin} ${params}
|
||||
@ -180,8 +180,8 @@ case "$1" in
|
||||
|
||||
if test $? -eq 0 ; then
|
||||
if test "$start_klogd" = yes ; then
|
||||
startproc ${klog_bin} -c $KERNEL_LOGLEVEL $KLOGD_PARAMS
|
||||
rc_status
|
||||
startproc ${klog_bin} -c $KERNEL_LOGLEVEL $KLOGD_PARAMS
|
||||
rc_status
|
||||
fi
|
||||
fi
|
||||
rc_status -v
|
||||
@ -192,9 +192,9 @@ case "$1" in
|
||||
|
||||
echo -n "Shutting down syslog services"
|
||||
if test "$start_klogd" = yes ; then
|
||||
killproc -TERM ${klog_bin} ; rc_status
|
||||
killproc -TERM ${klog_bin} ; rc_status
|
||||
else
|
||||
killproc -TERM ${klog_bin}
|
||||
killproc -TERM ${klog_bin}
|
||||
fi
|
||||
killproc -p ${syslog_use_pid} -TERM ${syslog_use} ; rc_status -v
|
||||
rm -f /var/lock/subsys/syslogd
|
||||
@ -219,10 +219,10 @@ case "$1" in
|
||||
reload|force-reload)
|
||||
echo -n "Reload syslog service"
|
||||
if test "$start_klogd" = yes ; then
|
||||
killproc -TSTP ${klog_bin} ; rc_status
|
||||
killproc -TSTP ${klog_bin} ; rc_status
|
||||
killproc -p ${syslog_use_pid} -HUP ${syslog_use} ; rc_status
|
||||
killproc -CONT ${klog_bin} ; rc_status
|
||||
killproc -USR2 ${klog_bin} ; rc_status -v
|
||||
killproc -CONT ${klog_bin} ; rc_status
|
||||
killproc -USR2 ${klog_bin} ; rc_status -v
|
||||
else
|
||||
killproc -p ${syslog_use_pid} -HUP ${syslog_use} ; rc_status -v
|
||||
fi
|
||||
|
@ -1,5 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 31 20:47:31 CEST 2010
|
||||
Mon Apr 12 12:28:46 CEST 2010 - werner@suse.de
|
||||
|
||||
- Reformat boot script
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 31 20:47:31 CEST 2010 - pczanik@genesi-usa.com
|
||||
|
||||
- modify /etc/init.d/syslog for syslog-ng 3.X
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user