Package: procps
Version: 1:3.2.7-4
Tags: patch

When upgrading my unstable chroot today, I ran into a problem with the
init.d scripts in procps.  I am using the dependency based boot
sequencer insserv, and it complained about duplicate init.d scripts
providing procps.

Checking this closer, the problem seem to be that both procps and
procps.sh exist.  The trigger is that the old script is left in
/etc/init.d/ after it is removed from the rc.d directories.  Here is
some key info about the problematic situation.

# dpkg -S /etc/init.d/procps /etc/init.d/procps.sh
procps: /etc/init.d/procps
procps: /etc/init.d/procps.sh
# less /etc/init.d/procps /etc/init.d/procps.sh
# diff  /etc/init.d/procps /etc/init.d/procps.sh
12,13d11
< # Short-Description: Configure kernel parameters at boottime
< # Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
40c38
<                echo "Usage: /etc/init.d/procps 
{start|stop|restart|force-reload}" >&2
---
>                echo "Usage: /etc/init.d/procps.sh 
> {start|stop|restart|force-reload}" >&2
# diff -u  /etc/init.d/procps /etc/init.d/procps.sh
--- /etc/init.d/procps  2007-08-08 13:48:29.000000000 +0200
+++ /etc/init.d/procps.sh       2006-09-13 03:42:17.000000000 +0200
@@ -9,8 +9,6 @@
 # Required-Stop:
 # Default-Start:     S
 # Default-Stop:
-# Short-Description: Configure kernel parameters at boottime
-# Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
 ### END INIT INFO


@@ -37,7 +35,7 @@
        stop)
                ;;
        *)
-               echo "Usage: /etc/init.d/procps 
{start|stop|restart|force-reload}" >&2
+               echo "Usage: /etc/init.d/procps.sh 
{start|stop|restart|force-reload}" >&2
                exit 3
                ;;
 esac
# ls -l /etc/rc*.d/*procps*
lrwxrwxrwx 1 root root 19 Apr 12 10:06 /etc/rc0.d/K18procps.sh -> 
../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Apr 12 10:06 /etc/rc1.d/S03procps.sh -> 
../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Apr 12 10:06 /etc/rc2.d/S03procps.sh -> 
../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Apr 12 10:06 /etc/rc3.d/S03procps.sh -> 
../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Apr 12 10:06 /etc/rc4.d/S03procps.sh -> 
../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Apr 12 10:06 /etc/rc5.d/S03procps.sh -> 
../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Apr 12 10:06 /etc/rc6.d/K18procps.sh -> 
../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Jul  8 10:11 /etc/rcS.d/S03procps.sh -> 
../init.d/procps.sh
#

This patch solve the problem, by getting rid of the old script before
calling update-rc.d to install the new one.  It might be a good idea
to check the version number being upgraded from, as well as the MD5
sum of the old script, before removing it.  This patch just solve the
easy part.

--- /tmp/procps.postinst        2007-08-10 11:52:55.000000000 +0200
+++ /var/lib/dpkg/info/procps.postinst  2007-08-10 11:53:31.000000000 +0200
@@ -37,6 +37,10 @@
        then
           update-rc.d -f procps.sh remove >/dev/null
        fi
+       if [ -f /etc/init.d/procps.sh ]
+       then
+          rm /etc/init.d/procps.sh
+       fi
        # and if that didn't work Closes: #92184 (#234306 with -L )
        if [ -L /etc/rcS.d/S30procps.sh ]
        then

Happy hacking,
-- 
Petter Reinholdtsen


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

Reply via email to