Package: sfs-client
Version: 1:0.8-0+pre20050819.1-2.1
Severity: normal
Tags: patch

The postrm for sfs-client (all versions from Woody through to Sid!)
leaves dangling rc[0-6].d symlinks after a purge, because it calls:

 case "$1" in
 [...]
   purge)
   if [ -f /etc/init.d/sfs-client ]; then
   update-rc.d sfs-client remove >>/dev/null
   fi
   ;;

But that initscript just got deleted; and if it had somehow avoided
this fate, it would ipso facto be pointless to call update-rc.d -
see man page: 

# When invoked with the remove option, update-rc.d removes any links
# in the /etc/rc<runlevel>.d directories to the script
# /etc/init.d/<name>.  The script must have been deleted already.
# If the script is still present then update-rc.d aborts with an
# error message. 

Policy 9.3.3.1 gives an example of how this is done (paragraph 4),
but there's no "must" - indeed, the RTFM directive even comes with a
"please". 

And what's that ">>/dev/null" about?  Worried that plain ">" might
truncate it to zero length?  The standard dh_installinit idiom is:

 if [ "$1" = "purge" ] ; then         
 update-rc.d <name> remove >/dev/null || exit 0
 fi         

which avoids letting muffled non-removals mysteriously crash dpkg.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.xamanek
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages sfs-client depends on:
ii  libc6          2.3.6-7                   GNU C Library: Shared libraries
ii  libgcc1        1:4.1.0-1+b1              GCC support library
ii  libgmp3c2      4.1.4-10                  Multiprecision arithmetic library
ii  libsfs0c2      1:0.8-0+pre20050819.1-2.1 Self-Certifying File System shared
ii  libstdc++6     4.1.0-1+b1                The GNU Standard C++ Library v3
ii  python         2.3.5-5                   An interactive high-level object-o
ii  sfs-common     1:0.8-0+pre20050819.1-2.1 Self-Certifying File System common

sfs-client recommends no packages.

-- no debconf information

-- 
JBR
Ankh kak! (Ancient Egyptian blessing)

diff -ru sfs-0.8-0+pre20050819.1.pristine/debian/sfs-client.postrm 
sfs-0.8-0+pre20050819.1/debian/sfs-client.postrm
--- sfs-0.8-0+pre20050819.1.pristine/debian/sfs-client.postrm   2006-05-11 
00:54:46.000000000 +0100
+++ sfs-0.8-0+pre20050819.1/debian/sfs-client.postrm    2006-05-11 
00:58:11.000000000 +0100
@@ -7,9 +7,7 @@
     ;;
 
   purge)
-    if [ -f /etc/init.d/sfs-client ]; then
-    update-rc.d sfs-client remove >>/dev/null
-    fi
+    update-rc.d sfs-client remove >/dev/null || exit 0
     ;;
 
   upgrade)

Reply via email to