[Martin Schulze]
> Petter, you can probably tell why insserv has trouble shutting down
> syslogd.

Yes.  It does not really have problems shutting down syslogd.  The
issue here is that I should have made it depend on $remote_fs instead
of $local_fs, because with the current setup it need to stop before
sendsigs kills it.  The init.d script for sysklogd and klogd have a
bug that make it report failure when stopping the daemon also when the
daemon is already stopped.  This is what is happing here.
init.d/sendsigs already killed both, and later when the sysklogd and
klogd scripts are executed during shutdown, they complain.

The quick fix is to change the dependency information like this:

diff -u /etc/init.d/sysklogd /tmp/sysklogd
--- /etc/init.d/sysklogd        2008-02-23 20:20:01.000000000 +0100
+++ /tmp/sysklogd       2008-05-08 21:42:35.000000000 +0200
@@ -3,8 +3,8 @@

 ### BEGIN INIT INFO
 # Provides:             sysklogd
-# Required-Start:       $local_fs $time
-# Required-Stop:        $local_fs $time
+# Required-Start:       $remote_fs $time
+# Required-Stop:        $remote_fs $time
 # Should-Start:         $network
 # Should-Stop:          $network
 # Default-Start:        2 3 4 5


I believe a better fix is to use the omitpid feature of sendsigs to
make sysklogd and klogd survive sendsigs and kill them just before
/var/ and / is umounted/mounted read-only (see #468649).  This will
allow for more syslog messages to be collected during shutdown, and
ease debugging if anything go wrong in this period.

I would also recommend changing klogd like this to make sure it can be
installed with any syslog daemon, not only sysklogd.

diff -u /etc/init.d/klogd /tmp/klogd
--- /etc/init.d/klogd   2008-02-23 20:20:08.000000000 +0100
+++ /tmp/klogd  2008-05-08 21:42:25.000000000 +0200
@@ -3,8 +3,8 @@

 ### BEGIN INIT INFO
 # Provides:             klogd
-# Required-Start:       sysklogd
-# Required-Stop:        sysklogd
+# Required-Start:       $syslog
+# Required-Stop:        $syslog
 # Default-Start:        2 3 4 5
 # Default-Stop:         0 1 6
 # Short-Description:    Kernel logger

Happy hacking,
-- 
Petter Reinholdtsen



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

Reply via email to