Package: ekeyd Version: 1.0.1-1 Severity: serious Tags: patch User: initscripts-ng-de...@lists.alioth.debian.org Usertags: incorrect-runlevels incorrect-dependency
With dependency based boot sequencing, I discovered what I believe is a bug in the init.d script. The init.d script headers to not match the arguments used by update-rc.d. I assume the update-rc.d call is correct, and propose to adjust the headers. Also, the scripts uses files in /usr/, and should depend on $remote_fs, and used to start after the syslog was operational and should probably continue to do so. The udev dependency should probably be optional, as it is not required to use udev in Debian. Last, I suspect the scripts should have a fixed order, and the old one was to start ekeyd-egd-linux before ekeyd. This should be expressed explicitly. <URL: http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/initscrcomconv.html > documents the LSB header format. Some debian notes are available from <URL: http://wiki.debian.org/LSBInitScripts >. This patch should fix the issues. Setting severity serious as the script will fail to work if /usr/ is on a separate partition, not yet mounted when the scripts are executed too early during boot. diff -ur ekeyd-1.0.4/debian/ekeyd-egd-linux.init ekeyd-1.0.4-pere/debian/ekeyd-egd-linux.init --- ekeyd-1.0.4/debian/ekeyd-egd-linux.init 2009-09-13 13:15:20.000000000 +0200 +++ ekeyd-1.0.4-pere/debian/ekeyd-egd-linux.init 2009-09-13 13:18:12.000000000 +0200 @@ -2,10 +2,10 @@ ### BEGIN INIT INFO # Provides: ekeyd-egd-linux -# Required-Start: -# Required-Stop: -# Default-Start: S -# Default-Stop: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 # Short-Description: Entropy Key Manager, EGD->Linux pool stirrer ### END INIT INFO diff -ur ekeyd-1.0.4/debian/ekeyd.init ekeyd-1.0.4-pere/debian/ekeyd.init --- ekeyd-1.0.4/debian/ekeyd.init 2009-09-13 13:15:20.000000000 +0200 +++ ekeyd-1.0.4-pere/debian/ekeyd.init 2009-09-13 13:17:50.000000000 +0200 @@ -2,10 +2,11 @@ ### BEGIN INIT INFO # Provides: ekeyd -# Required-Start: udev -# Required-Stop: -# Default-Start: S -# Default-Stop: +# Required-Start: $remote_fs $syslog ekeyd-egd-linux +# Required-Stop: $remote_fs $syslog ekeyd-egd-linux +# Should-Start: udev +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 # Short-Description: Entropy Key Manager ### END INIT INFO diff -ur ekeyd-1.0.4/debian/ekeyd.postinst ekeyd-1.0.4-pere/debian/ekeyd.postinst --- ekeyd-1.0.4/debian/ekeyd.postinst 2009-09-13 13:15:20.000000000 +0200 +++ ekeyd-1.0.4-pere/debian/ekeyd.postinst 2009-09-13 13:30:59.000000000 +0200 @@ -6,5 +6,13 @@ udevadm control --reload-rules 2>/dev/null || udevadm control --reload_rules 2>/dev/null fi +# Those using dependency based boot sequencing with sysv-rc and installing +# ekeyd-egd-linux before and including version 1.0.4-1 would have wrong +# runlevel symlinks. Recover from this. +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "1.0.4-1" \ + && [ -f /etc/rcS.d/S[0-9][0-9]ekeyd ] ; then + update-rc.d -f ekeyd remove +fi + #DEBHELPER# diff -urN ekeyd-1.0.4/debian/ekeyd-egd-linux.postinst ekeyd-1.0.4-pere/debian/ekeyd-egd-linux.postinst --- ekeyd-1.0.4/debian/ekeyd-egd-linux.postinst 1970-01-01 01:00:00.000000000 +0100 +++ ekeyd-1.0.4-pere/debian/ekeyd-egd-linux.postinst 2009-09-13 13:34:44.000000000 +0200 @@ -0,0 +1,12 @@ +#!/bin/sh -e + +# Those using dependency based boot sequencing with sysv-rc and installing +# ekeyd-egd-linux before and including version 1.0.4-1 would have wrong +# runlevel symlinks. Recover from this. +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "1.0.4-1" \ + && [ -f /etc/rcS.d/S[0-9][0-9]ekeyd-egd-linux ] ; then + update-rc.d -f ekeyd-egd-linux remove +fi + +#DEBHELPER# + Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org