Package:  sysklogd klogd
Version:  1.5-2
Tags:     patch
User:     [EMAIL PROTECTED]
Usertags: runtime-problem

With the new feature of sendsigs to ignore some pids, it is now
possible to let the syslog collector keep running for a bit longer
during shutdown, and thus collect syslog messages related to umounting
remote file systems etc.  To allow this, the pid need to be stored in
one of the files used by /etc/init.d/sendsigs to fetch pids to ignore.

I suggest symlinking to the pid file, to make sure no pid is passed to
sendsigs when no daemon is running.  Here is a patch to do this.

With this patch, the shutdown sequence used by sysklogd and klogd with
dependency based boot sequencing do not produce error messages because
the scripts are running after sendsigs.

diff -ur sysklogd-1.5.orig/debian/rc sysklogd-1.5/debian/rc
--- sysklogd-1.5.orig/debian/rc 2008-02-29 19:57:03.000000000 +0100
+++ sysklogd-1.5/debian/rc      2008-02-29 19:57:56.000000000 +0100
@@ -81,6 +81,8 @@
     create_xconsole
     start-stop-daemon --start --quiet --pidfile $pidfile --name syslogd 
--startas $binpath -- $SYSLOGD
     log_end_msg $?
+    rm -f /lib/init/rw/sendsigs.omit.d/sysklogd
+    ln -s $pidfile /lib/init/rw/sendsigs.omit.d/sysklogd
     ;;
   stop)
     log_begin_msg "Stopping system log daemon..."
diff -ur sysklogd-1.5.orig/debian/rc.klogd sysklogd-1.5/debian/rc.klogd
--- sysklogd-1.5.orig/debian/rc.klogd   2008-02-29 19:57:03.000000000 +0100
+++ sysklogd-1.5/debian/rc.klogd        2008-02-29 19:59:59.000000000 +0100
@@ -26,6 +26,8 @@
     log_begin_msg "Starting kernel log daemon..."
     start-stop-daemon --start --quiet --pidfile $pidfile --name klogd 
--startas $binpath -- $KLOGD
     log_end_msg $?
+    rm -f /lib/init/rw/sendsigs.omit.d/klogd
+    ln -s $pidfile /lib/init/rw/sendsigs.omit.d/klogd
     ;;
   stop)
     log_begin_msg "Stopping kernel log daemon..."

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to