-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 There was as small typo in my initial patch. Please use the attached, updated version.
Cheers, Michael - -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGIERNh7PER70FhVQRAhstAJ9quc+CxrlGB69szx/zJDdnY4KPmwCfWg4n WJOiIi+A3YwBI28J+a+C0Mk= =S6l9 -----END PGP SIGNATURE-----
--- syslog-ng.orig 2007-04-14 04:31:42.000000000 +0200 +++ syslog-ng 2007-04-14 04:50:53.000000000 +0200 @@ -25,6 +25,10 @@ #we source /etc/default/syslog-ng if exists [ -r /etc/default/syslog-ng ] && . /etc/default/syslog-ng +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + case "x$CONSOLE_LOG_LEVEL" in x[1-8]) dmesg -n $CONSOLE_LOG_LEVEL @@ -32,13 +36,13 @@ x) ;; *) - echo "CONSOLE_LOG_LEVEL is of unaccepted value." + log_warning_msg "CONSOLE_LOG_LEVEL is of unaccepted value." ;; esac if [ -n "$KERNEL_RINGBUF_SIZE" ] then - echo "KERNEL_RINGBUF_SIZE option is useless and therefore removed." + log_warning_msg "KERNEL_RINGBUF_SIZE option is useless and therefore removed." fi # stop syslog-ng before changing its PID file! @@ -55,30 +59,35 @@ } syslogng_start() { - echo -n "Starting system logging: $NAME" - start-stop-daemon --start --quiet --exec "$SYSLOGNG" --pidfile "$PIDFILE" -- -p "$PIDFILE" \ - || { echo " start failed."; return 1; } - echo "." - return 0 + log_daemon_msg "Starting system logging" "$NAME" + start-stop-daemon --start --quiet --exec "$SYSLOGNG" \ + --pidfile "$PIDFILE" -- -p "$PIDFILE" + RET="$?" + log_end_msg $RET + return $RET } syslogng_stop() { - echo -n "Stopping system logging: $NAME" - start-stop-daemon --stop --quiet --name "$NAME" --retry 3 --pidfile "$PIDFILE" || { echo " not running."; return 1; } - echo "." + log_daemon_msg "Stopping system logging" "$NAME" + start-stop-daemon --stop --quiet --name "$NAME" --retry 3 \ + --pidfile "$PIDFILE" + RET="$?" + log_end_msg $RET rm -f "$PIDFILE" - return 0 + return $RET } syslogng_reload() { - echo -n "Reload system logging: $NAME" + log_daemon_msg "Reload system logging" "$NAME" if /sbin/syslog-ng -s then - start-stop-daemon --stop --signal 1 --quiet --exec "$SYSLOGNG" --pidfile "$PIDFILE" || return 1 - echo "." - return 0 + start-stop-daemon --stop --signal 1 --quiet --exec "$SYSLOGNG" \ + --pidfile "$PIDFILE" + RET="$?" + log_end_msg $RET + return $RET else - echo " Failed" + log_end_msg 1 return 1 fi }
syslog_ng_lsb.patch.sig
Description: Binary data