diff --git a/logrotate.syslog b/logrotate.syslog index bda3dce..b16e23f 100644 --- a/logrotate.syslog +++ b/logrotate.syslog @@ -11,7 +11,8 @@ # other by all syslog daemons. # the mail log files are used by all syslog daemons # the news log files are used by all syslog daemons -/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall /var/log/acpid /var/log/NetworkManager +/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages +/var/log/firewall /var/log/acpid /var/log/NetworkManager /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err /var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice { @@ -25,6 +26,6 @@ create 640 root root sharedscripts postrotate - /etc/init.d/syslog reload > /dev/null + /usr/bin/systemctl reload syslog.service > /dev/null endscript } diff --git a/rc.earlysyslog b/rc.earlysyslog deleted file mode 100644 index f030bf4..0000000 --- a/rc.earlysyslog +++ /dev/null @@ -1,112 +0,0 @@ -#! /bin/sh -# -# Copyright (c) 1996-2001 SuSE GmbH Nuernberg, Germany. -# Copyright (c) 2002-2003 SuSE Linux AG, Nuernberg, Germany. -# Copyright (c) 2004-2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# -# Author: Florian La Roche , 1996 -# Werner Fink , 1998-2008 -# Stephan Kulow , 2005-2008 -# Marius Tomaschewski , 2001-2008 -# -# /etc/init.d/syslog -# -### BEGIN INIT INFO -# Provides: earlysyslog -# Required-Start: -# Required-Stop: -# Default-Start: 2 3 5 -# Default-Stop: -# Description: Start the system logging daemons -### END INIT INFO - -. /etc/sysconfig/syslog - -BINDIR=/sbin - -if type -t rc_readonlyroot > /dev/null 2>&1 && rc_readonlyroot ; then - echo "Disabling early syslog on read-only root filesystem." - exit 0 -fi - -# 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 -} - -# set daemon dependent variables -case "$SYSLOG_DAEMON" in - rsyslogd) - syslog=rsyslogd - config=/etc/rsyslog.conf - ;; - 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) - case ${SYSLOG_REQUIRES_NETWORK} in - yes) exit 0 ;; - no) ;; - "") - while read line ; do - case "$line" in - \#*|"") continue ;; - *udp\ *|*udp\(*) exit 0 ;; - *tcp\ *|*tcp\(*) exit 0 ;; - esac - done < ${config} - ;; - esac - ;; - rsyslogd) - # Network is usually not required for properly configured - # rsyslogd with enabled on-disk queues for remote logging, - # so we just start it with its normal configuration. - # "yes" allows the user to disable the early start. - case ${SYSLOG_REQUIRES_NETWORK} in - yes) exit 0 ;; - no|"") ;; - esac - ;; - *) - case ${SYSLOG_REQUIRES_NETWORK} in - yes) exit 0 ;; - no) ;; - "") - while read select action ; do - case "$select" in \#*|"") continue ;; esac - case "$action" in *@*) exit 0 ;; esac - done < ${config} - ;; - esac - ;; -esac - -exec /etc/init.d/syslog $1 early diff --git a/rc.syslog b/rc.syslog index 07861d3..242ca5a 100644 --- a/rc.syslog +++ b/rc.syslog @@ -1,255 +1,18 @@ -#! /bin/sh +#!/bin/sh # -# Copyright (c) 1996-2001 SuSE GmbH Nuernberg, Germany. -# Copyright (c) 2002-2003 SuSE Linux AG, Nuernberg, Germany. -# Copyright (c) 2004-2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # -# Author: Florian La Roche , 1996 -# Werner Fink , 1998-2008 -# Stephan Kulow , 2005-2008 -# Marius Tomaschewski , 2001-2008 +# Author: +# Werner Fink +# Marius Tomaschewski # -# /etc/init.d/syslog +# Description: +# Compatibility script triggering a "systemctl syslog.service" +# redirection using rc.status. # -### BEGIN INIT INFO -# Provides: syslog -# Required-Start: -# Should-Start: earlysyslog network -# Required-Stop: -# Should-Stop: earlysyslog network -# Default-Start: 2 3 5 -# Default-Stop: -# Description: Start the system logging daemons -### END INIT INFO - -. /etc/sysconfig/syslog - -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 -} - -# set daemon dependent variables -rsocks="" -start_klogd=yes -case "$SYSLOG_DAEMON" in - rsyslogd) - syslog=rsyslogd - config=/etc/rsyslog.conf - compat=${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}} - params="-c ${compat:-3} -f $config $RSYSLOGD_PARAMS" - rsocks="/var/run/rsyslog/additional-log-sockets.conf" - mkdir -p -m 0755 /var/run/rsyslog - test -r "$config" && \ - while read one two rest ; do - test "x$one" = 'x$ModLoad' && \ - test "x$two" = 'ximklog.so' && { - start_klogd=no - break - } - done < $config - ;; - syslog-ng) - syslog=syslog-ng - config=/etc/syslog-ng/syslog-ng.conf - params="$SYSLOG_NG_PARAMS" - ngsocks="/var/run/syslog-ng/additional-log-sockets.conf" - ngsocksdir="/var/run/syslog-ng" - mkdir -p -m 0755 $ngsocksdir - test -r "$config" && \ - while read line; do - case $line in file*/proc/kmsg*) - start_klogd=no ; break ;; - esac - done < $config - ;; - *) - syslog=syslogd - config=/etc/syslog.conf - params="$SYSLOGD_PARAMS" - ;; -esac - -syslog_pid="/var/run/${syslog}.pid" -syslog_bin=${BINDIR}/$syslog - klog_bin=${BINDIR}/klogd -syslog_use="" - -# check config and programs -test -s ${config} || { - echo "${config} does not exist" 1>&2 - test "$1" == "stop" && exit 0 - exit 6 -} -test -x ${syslog_bin} || { - echo "${syslog_bin} is not installed" 1>&2 - test "$1" == "stop" && exit 0 - exit 5 -} -test ! -x ${klog_bin} -a "$start_klogd" = yes && { - echo "${klog_bin} is not installed" 1>&2 - test "$1" == "stop" && exit 0 - exit 5 -} -test -s /run/rcsyslog && { - read -t 5 syslog_use < /run/rcsyslog -} -test -z "$syslog_use" && syslog_use=${syslog_bin} -syslog_use_pid="/var/run/${syslog_use##*\/}.pid" - -# -# Do not translate symbol addresses for 2.6 kernel -# -case "$(uname -r)" in -[01].*|2.[0-4].*) ;; -*) case "$KLOGD_PARAMS" in - *-x*) ;; - *) KLOGD_PARAMS="${KLOGD_PARAMS:+$KLOGD_PARAMS }-x" ;; - esac ;; -esac . /etc/rc.status -rc_reset -case "$1" in - start) - if test -e /run/rcearlysyslog ; then - # Syslog service already done - rm -f /run/rcearlysyslog - case "$SYSLOG_DAEMON" in - rsyslogd) ;; # switch to normal config - *) exit 0 ;; - esac - elif test "$2" = "early" ; then - # Start syslog service early - > /run/rcearlysyslog - fi - if ! test -e /dev/xconsole ; then - mknod -m 0600 /dev/xconsole p - chown root:tty /dev/xconsole - fi - killproc -p /var/run/klogd.pid ${klog_bin} - if test -s ${syslog_use_pid} ; then - killproc -p ${syslog_use_pid} ${syslog_use} - echo -n "Re-" - rm -f /run/rcsyslog - fi - echo -n "Starting syslog services" - test -z "$KERNEL_LOGLEVEL" && KERNEL_LOGLEVEL=1 +echo "Usage: /sbin/rcsyslog {start|stop|status|try-restart|restart|force-reload|reload}" +exit 1 - 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 test -n "$rsocks" ; then - echo "\$AddUnixListenSocket $value" >> "$rsocks" - fi - ;; - syslog-ng) - echo "unix-dgram(\"$value\");" >> "$ngsocks" - ;; - *) - params="$params -a $value" - ;; - esac - } - done - case $syslog in - syslog-ng) - echo "};" >> "$ngsocks" - ;; - esac - startproc -p ${syslog_pid} ${syslog_bin} ${params} - rc_status - - # Remember the currently used syslog daemon - echo ${syslog_bin} > /run/rcsyslog - - if test $? -eq 0 ; then - if test "$start_klogd" = yes ; then - startproc ${klog_bin} -c $KERNEL_LOGLEVEL $KLOGD_PARAMS - rc_status - fi - fi - rc_status -v - ;; - stop) - rm -f /run/rcearlysyslog - test "$2" = "early" && exit 0 - - echo -n "Shutting down syslog services" - if test "$start_klogd" = yes ; then - killproc ${klog_bin} ; rc_status - else - killproc ${klog_bin} - fi - killproc -p ${syslog_use_pid} ${syslog_use} ; rc_status -v - rm -f /run/rcsyslog - ;; - try-restart|condrestart) - if test "$1" = "condrestart"; then - echo "${attn} Use try-restart ${done}(LSB)${attn} instead${norm}" - fi - $0 status - if test $? = 0; then - $0 restart - else - rc_reset # Not running is not a failure. - fi - rc_status - ;; - restart) - $0 stop - $0 start - rc_status - ;; - reload|force-reload) - echo -n "Reload syslog service" - if test "$start_klogd" = yes ; then - 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 - else - killproc -p ${syslog_use_pid} -HUP ${syslog_use} ; rc_status -v - fi - ;; - status) - echo -n "Checking for service syslog:" - if test "$start_klogd" = yes ; then - checkproc ${klog_bin} ; rc_status - fi - checkproc -p ${syslog_use_pid} ${syslog_use} ; rc_status -v - ;; - probe) - if test "${syslog_use_pid}" != "${syslog_pid}" ; then - echo restart - else - # Note: does not work when an included rsyslog config changed - test ${config} -nt ${syslog_pid} && echo reload - fi - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" - exit 1 - ;; -esac -rc_exit diff --git a/sysconfig.syslog b/sysconfig.syslog deleted file mode 100644 index 8923e2c..0000000 --- a/sysconfig.syslog +++ /dev/null @@ -1,30 +0,0 @@ -## Path: System/Logging -## Description: System logging - -## Type: list(syslogd,syslog-ng,rsyslogd,"") -## Default: "" -## Config: "" -## ServiceRestart: syslog -# -# The name of the syslog daemon to use as syslog service: -# "syslogd", "syslog-ng", "rsyslogd" or "" for autodetect. -# -SYSLOG_DAEMON="" - -## Type: list(yes,no,"") -## Default: "" -## Config: "" -## ServiceRestart: syslog -# -# Specify whether the syslog configuration requires network. -# Set to "yes" to delay the syslog daemon start until network -# is already started, set to "no" to start it earlier. -# -# The behavior of the default setting "" depends on the daemon -# specified in the SYSLOG_DAEMON variable and on the current -# implementation of the init / systemd scripts. It may cause -# a try to detect whether network is required for the config -# or choose one of the above modi. -# -SYSLOG_REQUIRES_NETWORK="" - diff --git a/syslog-service-generator b/syslog-service-generator deleted file mode 100644 index 5d11e5d..0000000 --- a/syslog-service-generator +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# -# /lib/systemd/system-generator/syslog-service-generator -# -# Copyright (c) 2011 SuSE LINUX Products GmbH, Germany. -# -# Description: -# -# Write out syslog.core and if required enable klogd.service -# depending on the configuration found in /etc/sysconfig/syslog. -# Also check if network target is required with this we do not -# required the earlysyslog hack anymore. -# Based on the /etc/init.d/syslog SysV init boot script as well -# as on the /etc/init.d/earlysyslog wrapper script. -# -# Author: Werner Fink -# Please send feedback to http://www.suse.de/feedback -# - -umask 0022 -TMPDIR=/run - -export TMPDIR - -: ${SBINDIR:=/sbin} -: ${RUN_PATH:=/run/systemd} -: ${SYSUNITDIR:=/lib/systemd/system} -: ${SYSCONFDIR:=/etc/systemd/system} - -if test -s /etc/sysconfig/syslog ; then - CORE=$RUN_PATH/syslog.core - test -s $CORE -a $CORE -nt /etc/sysconfig/syslog && exit 0 - . /etc/sysconfig/syslog -else - SYSLOG_DAEMON=rsyslogd -fi - -# -# Danger Robinson: do not touch anything if a System logger -# is running under the control of systemd its self! -# -if test -d /sys/fs/cgroup/systemd/system/syslog.service -o \ - -d /sys/fs/cgroup/systemd/system/klogd.service -then - /bin/logger -i -p daemon.warn -t ${0##*/} \ - 'Stop syslog.service before reloading the daemons!' - exit 1 -fi - -# -# Update $SYSLOG_DAEMON if not up-to-date -# -if test -z "$SYSLOG_DAEMON" -o ! -x "$SBINDIR/$SYSLOG_DAEMON" ; then - for SYSLOG_DAEMON in rsyslogd syslog-ng syslogd ; do - test -x "$SBINDIR/$SYSLOG_DAEMON" && break - done -fi - -# -# Simple helper for correct permissions of the socket -# -touch () -{ - local mask=$(umask) - umask 0066 - /bin/touch ${1+"$@"} - umask $mask -} - -# -# Default is no network and start klogd -# -network= -start_klogd=yes -klogd=klogd.service - -# -# Now check for the three possible system loggers for required -# network connection and for external klogd. Note that /var/run -# does not exist at boot time, therefore files and directories -# will be created below the /run tmpfs. -# -case "$SYSLOG_DAEMON" in -syslog-ng) - syslog=syslog-ng - config=/etc/syslog-ng/syslog-ng.conf - socksdir=/var/run/syslog-ng - socks=$socksdir/additional-log-sockets.conf - case ${SYSLOG_REQUIRES_NETWORK} in - yes) network=network.target ;; - no) ;; - "") # OK, try to detect it; does not - # work with include files ... - if test -s "$config" ; then - while read line ; do - case "$line" in - \#*|"") continue ;; - *udp\ *|*udp\(*) network=network.target ;; - *tcp\ *|*tcp\(*) network=network.target ;; - esac - done < ${config} - fi - ;; - esac - if test -r "$config" ; then - while read line; do - case $line in - file*/proc/kmsg*) - start_klogd=no - break - esac - done < $config - fi - /bin/mkdir -p -m 0755 ${socksdir#/var} - touch ${socks#/var} - params="$SYSLOG_NG_PARAMS" - ;; -rsyslogd) - syslog=rsyslogd - config=/etc/rsyslog.conf - socksdir=/var/run/rsyslog - socks=$socksdir/additional-log-sockets.conf - # Network is usually not required for properly configured - # rsyslogd with enabled on-disk queues for remote logging, - # so we just start it with its normal configuration. - # "yes" allows the user to disable the early start. - case ${SYSLOG_REQUIRES_NETWORK} in - yes) network=network.target ;; - esac - if test -r "$config" ; then - while read one two rest ; do - if test "$one" = '$ModLoad' -a "$two" = 'imklog.so' ; then - start_klogd=no - break - fi - done < $config - fi - /bin/mkdir -p -m 0755 ${socksdir#/var} - touch ${socks#/var} - compat=${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}} - params="-c ${compat:-3} -f $config $RSYSLOGD_PARAMS" - ;; -*) - syslog=syslogd - config=/etc/syslog.conf - socksdir=/var/run/syslog - socks=$socksdir/additional-log-sockets.env - network= - case ${SYSLOG_REQUIRES_NETWORK} in - yes) network=network.target ;; - no) ;; - "") # Try to detect it - if test -s "$config" ; then - while read select action ; do - case "$select" in \#*|"") continue ;; esac - case "$action" in *@*) network=network.target ;; esac - done < ${config} - fi - ;; - esac - /bin/mkdir -p -m 0755 ${socksdir#/var} - touch ${socks#/var} - params="$SYSLOGD_PARAMS" -esac - -syslog_bin=${SBINDIR}/$syslog - klog_bin=${SBINDIR}/klogd - -test -s ${config} || exit 1 -test -x ${syslog_bin} || exit 1 - -# -# Make sure that we have a log fifo which is used by X11 -# -if test -e /dev/xconsole -a ! -p /dev/xconsole ; then - /bin/rm -f /dev/xconsole -fi -if test ! -e /dev/xconsole ; then - /bin/mknod -m 0600 /dev/xconsole p - /bin/chown root:tty /dev/xconsole -fi - -# -# No klogd.service required -# -test "$start_klogd" = no && klogd= - -# -# Create a temporary file for syslog.core -# -trap 'rm -f "$service"' EXIT -tmpcore=$(/bin/mktemp $RUN_PATH/syslog.XXXXXXXX) || exit 1 -(/bin/cat > $tmpcore)<<-EOF - # Warning: Do not edit as this file has been and will be autogenerated - # by $0 - ${network:+Requires=$network} - ${network:+After=$network} - ${klogd:+Requires=$klogd} - ${klogd:+Before=$klogd} - - [Service] - Type=forking - PIDFile=/var/run/${syslog_bin##*/}.pid - Sockets=syslog.socket - StandardOutput=null - ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service - ExecStartPre=-$socksdir/addsockets - ExecReload=/bin/kill -HUP \$MAINPID -EOF - -# -# For additional sockets we use further configuration files -# for rsyslogd and syslog-ng but an envrionment file for syslogd -# -case "$SYSLOG_DAEMON" in -rsyslogd) - (/bin/cat > ${socksdir#/var}/addsockets)<<-EOF - #!/bin/sh - # Warning: Do not edit as this file has been and will be - # autogenerated by $0 - test -s /etc/sysconfig/syslog && . /etc/sysconfig/syslog - umask 0022 - > $socks - for variable in \${!SYSLOGD_ADDITIONAL_SOCKET*}; do - eval value=\\\$\$variable - test -z "\$value" && continue - test ! -d \${value%/*} && continue - echo "\\\$AddUnixListenSocket \$value" - done >> $socks - EOF - ;; -syslog-ng) - (/bin/cat > ${socksdir#/var}/addsockets)<<-EOF - #!/bin/sh - # Warning: Do not edit as this file has been and will be - # autogenerated by $0 - test -s /etc/sysconfig/syslog && . /etc/sysconfig/syslog - umask 0022 - echo 'source chroots {' > $socks - for variable in \${!SYSLOGD_ADDITIONAL_SOCKET*}; do - eval value=\\\$\$variable - test -z "\$value" && continue - test ! -d \${value%/*} && continue - echo "unix-dgram(\\"\$value\\");" - done >> $socks - echo '};' >> $socks - EOF - ;; -*) - (/bin/cat > ${socksdir#/var}/addsockets)<<-EOF - #!/bin/sh - # Warning: Do not edit as this file has been and will be - # autogenerated by $0 - test -s /etc/sysconfig/syslog && . /etc/sysconfig/syslog - umask 0022 - echo -n 'ADDITIONAL_SOCKET="' > $socks - for variable in \${!SYSLOGD_ADDITIONAL_SOCKET*}; do - eval value=\\\$\$variable - test -z "\$value" && continue - test ! -d \${value%/*} && continue - echo -n "-a \$value " - done >> $socks - echo -n '"' >> $socks - EOF - echo "Environment=ADDITIONAL_SOCKET=" >>$tmpcore - echo "EnvironmentFile=-$socks" 1>>$tmpcore - params="${params:+$params }\$ADDITIONAL_SOCKET" -esac -chmod u+x ${socksdir#/var}/addsockets - -# -# If klogd.service is required handle reload of syslog.service efficient -# otherwise we may loose kernel messages or klogd is forwarding kernel -# messages back to systemd as the creator of the system logging socket -# and we would get a message loop. -# -exec 3>&1 1>>$tmpcore -echo "ExecStart=$syslog_bin $params" -if test "$start_klogd" != no ; then - echo "ExecReload=/bin/systemctl kill --signal=TSTP klogd.service" -fi -echo "ExecReload=/sbin/killproc -p /var/run/${syslog_bin##*/}.pid -HUP $syslog_bin" -if test "$start_klogd" != no ; then - echo "ExecReload=/bin/systemctl kill --signal=CONT klogd.service" - echo "ExecReload=/bin/systemctl kill --signal=USR2 klogd.service" -fi -echo -exec 1>&3 3>&- - -# -# If klogd.service is required, remove symbolic link for masking out -# otherwise just add the symbolic link -# -klogserv=$SYSCONFDIR/klogd.service -if test "$start_klogd" != no -a -x ${klog_bin} ; then - test -h $klogserv && rm -f $klogserv -else - /bin/ln -sf /dev/null $klogserv -fi - -# -# Now enable the service(s) for multi-user target -# -/bin/mv $tmpcore $CORE - -if test ! -d $SYSCONFDIR/multi-user.target.wants/ ; then - /bin/mkdir -p $SYSCONFDIR/multi-user.target.wants -fi - -syslogserv=$SYSUNITDIR/syslog.service -enableserv=$SYSCONFDIR/multi-user.target.wants/syslog.service -if test ! -h $enableserv ; then - /bin/rm -f $enableserv - /bin/ln -sf $syslogserv $enableserv -fi - -klogserv=$SYSUNITDIR/klogd.service -enableserv=$SYSCONFDIR/multi-user.target.wants/klogd.service -disablserv=$SYSCONFDIR/klogd.service -if test "$start_klogd" != no -a -e $klogserv ; then - if test ! -h $enableserv ; then - /bin/rm -f $enableserv - /bin/ln -sf $klogserv $enableserv - fi - if test -h $disablserv ; then - /bin/rm -f $disablserv - fi -else - if test ! -h $disablserv ; then - /bin/rm -f $disablserv - /bin/ln -sf /dev/null $disablserv - fi - if test -h $enableserv ; then - /bin/rm -f $enableserv - fi -fi - -# -# end of /lib/systemd/system-generator/syslog-service-generator diff --git a/syslog.8 b/syslog.8 index bbac1de..378292f 100644 --- a/syslog.8 +++ b/syslog.8 @@ -6,41 +6,52 @@ syslog-ng, syslogd .SH DESCRIPTION There are different syslog daemon implementations -supported as the system's syslog service, currently -.IR syslogd , -.IR syslog-ng \ and -.IR rsyslogd +supported as the system's syslog service, currently: +.BR syslogd , +.BR rsyslogd , +.BR syslog-ng . -The first installed daemon activates itself for the -syslog service. Starting with openSUSE-11.2, -it is -.IR rsyslogd , -before it was -.IR syslog-ng . -But this depends on the software selection during -the installation. +It depends on the software selection during the installation +which daemon is installed as default. -The name of the daemon used as syslog service is -specified in the -.br -.BR SYSLOG_DAEMON -variable in -.BR /etc/sysconfig/syslog . +Each syslog-daemon provides an own service file, that is: +.BR syslogd.service , +.BR rsyslogd.service , +.BR syslog-ng.service . +The first installed daemon activates itself as the syslog service. -The \fIyast2 sysconfig\fR module provides a comfortable -way to switch to another installed daemon and restart -the service. +This service file name should to be used to activate/deactivate one +of them with the \fBsystemctl enable\fR command, for example: +\fBsystemctl enable syslogd.service\fR. + +The activation registers the +.BR syslog.service +alias, which provides a common name to start/stop or query status of +the currently active daemon. The -.BR /etc/init.d/syslog -init script is able to handle all supported daemons. +.BR /etc/sysconfig/syslog +file contains several variables allowing to specify additional +settings, such as start parameters for the daemon or additional +chroot log sockets. +The \fIyast2 sysconfig\fR module provides a comfortable way to +change these settings. + +Starting with openSUSE-12.3, the +.BR SYSLOG_DAEMON +variable, which were used to select the daemon before, has been +removed. Also the +.BR SYSLOG_REQUIRES_NETWORK +has been removed and each daemon declares in its service file +whether the network will be started before syslog or not. .SH BUGS Please report bugs at .SH AUTHOR .nf -Juergen Weigert -Marius Tomaschewski +Juergen Weigert +Dr. Werner Fink +Marius Tomaschewski .SH "SEE ALSO" .BR sysklogd (8) .BR syslogd (8) diff --git a/syslog.service b/syslog.service deleted file mode 100644 index 21c4ab9..0000000 --- a/syslog.service +++ /dev/null @@ -1,31 +0,0 @@ -# /lib/systemd/system/syslog.service -# -# This file is part of package klogd. -# -# Copyright (c) 2011 SuSE LINUX Products GmbH, Germany. -# Author: Werner Fink -# Please send feedback to http://www.suse.de/feedback -# -# Description: -# -# Used to start one of the System Logging Service daemons -# depending on the configuration found in /etc/sysconfig/syslog. -# - -[Unit] -Description=System Logging Service -Requires=var-run.mount syslog.target -After=var-run.mount -Before=syslog.target -OnFailure=systemd-kmsg-syslogd.service -Conflicts=syslog-ng.service rsyslog.service - -# -# Now systemd include the further dependency rules and -# Service section. This include will be automatically -# updated depending on the configuration. -# -.include /run/systemd/syslog.core - -[Install] -WantedBy=multi-user.target diff --git a/syslog.xml b/syslog.xml index c053325..36a93a4 100644 --- a/syslog.xml +++ b/syslog.xml @@ -35,21 +35,21 @@ file extension. 6 - program is not configured 7 - program is not running --> - /sbin/rcsyslog start + /usr/bin/systemctl start syslog.service - /sbin/rcsyslog restart + /usr/bin/systemctl restart syslog.servic - /sbin/rcsyslog stop + /usr/bin/systemctl stop syslog.service - /sbin/rcsyslog status + /usr/bin/systemctl status syslog.service