Package:  rsyslog
Version:  2.0.4-1
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 rsyslog script can be executed after sendsigs
during shutdown.  The change of dependencies make sure it will happen
when dependency based boot sequencing is used.  It might be an idea to
change the sequence number used with manual sequencing too.

--- debian/rsyslog.init.orig    2008-04-06 09:46:22.000000000 +0200
+++ debian/rsyslog.init 2008-04-06 09:47:28.000000000 +0200
@@ -1,10 +1,8 @@
 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:          syslog
-# Required-Start:    $remote_fs $time
-# Required-Stop:     $remote_fs $time
-# Should-Start:      $network
-# Should-Stop:       $network
+# Required-Start:    $local_fs $time
+# Required-Stop:     $local_fs $time
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: enhanced syslogd
@@ -111,6 +109,8 @@
        case "$?" in
                2) log_end_msg 1 ;;
        esac
+       rm -f /lib/init/rw/sendsigs.omit.d/rsyslog
+       ln -s $RSYSLOGD_PIDFILE /lib/init/rw/sendsigs.omit.d/rsyslog

        log_progress_msg "$RKLOGD"
        do_start "$RKLOGD_BIN" "$RKLOGD_OPTIONS" "$RKLOGD_PIDFILE"
@@ -118,6 +118,8 @@
                0|1) log_end_msg 0 ;;
                2) log_end_msg 1 ;;
        esac
+       rm -f /lib/init/rw/sendsigs.omit.d/rklogd
+       ln -s $RKLOGD_PIDFILE /lib/init/rw/sendsigs.omit.d/rklogd
        ;;
   stop)
        log_daemon_msg "Stopping $DESC" "$RKLOGD"

Happy hacking,
-- 
Petter Reinholdtsen



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

Reply via email to