Bug#522916: must use invoke-rc.d (policy 9.3.3.2)

Andreas Tille tillea at rki.de
Tue Apr 7 21:23:44 UTC 2009


On Tue, 7 Apr 2009, Holger Levsen wrote:

> during a test with piuparts I noticed your package left processes running on
> the system after installation and removal. This is due to directly
> calling /etc/rc.d/ scripts in your packages maintainer scripts, which is a
> violation of policy 9.3.3.2 and must be replaced by using policy-rc.d - see
> http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.3

Thanks for your investigation.  Before I go for an upload I would like
you to revise my proposed patch:


Index: dict-wn.postinst
===================================================================
--- dict-wn.postinst	(Revision 35616)
+++ dict-wn.postinst	(Arbeitskopie)
@@ -6,14 +6,18 @@

  case "$1" in
       configure)
-      if [ -x /usr/sbin/dictdconfig ]; then dictdconfig -w ;fi
+	if [ -x /usr/sbin/dictdconfig ]; then dictdconfig -w ;fi

-      if [ -x /etc/init.d/dictd ]; then /etc/init.d/dictd restart; fi
+	# if [ -x /etc/init.d/dictd ]; then /etc/init.d/dictd restart; fi
+	if which invoke-rc.d >/dev/null 2>&1; then
+	    invoke-rc.d dictd restart
+	else
+	    /etc/init.d/dictd restart
+	fi

-     exit 0
-     ;;
+	exit 0
+    ;;

-
      failed-upgrade/abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
          exit 0;
      ;;
Index: changelog
===================================================================
--- changelog	(Revision 35616)
+++ changelog	(Arbeitskopie)
@@ -1,3 +1,10 @@
+wordnet (1:3.0-15) unstable; urgency=low
+
+  * Fix usage of init scripts debian/dict-wn.{postinst,prerm}
+    Closes: #522916
+
+ -- Andreas Tille <tille at debian.org>  Tue, 07 Apr 2009 22:58:07 +0200
+
  wordnet (1:3.0-14) unstable; urgency=low

    * Removed redundant part from description
Index: dict-wn.postrm
===================================================================
--- dict-wn.postrm	(Revision 35616)
+++ dict-wn.postrm	(Arbeitskopie)
@@ -4,13 +4,17 @@

  case "$1" in
      remove|purge)
-     if [ -x /usr/sbin/dictdconfig ]; then dictdconfig -w ;fi
-     if [ -x /etc/init.d/dictd ]; then /etc/init.d/dictd restart; fi
+	if [ -x /usr/sbin/dictdconfig ]; then dictdconfig -w ;fi

-     exit 0
-     ;;
+	# if [ -x /etc/init.d/dictd ]; then /etc/init.d/dictd restart; fi
+        if which invoke-rc.d >/dev/null 2>&1; then
+	    invoke-rc.d dictd restart
+	else
+	    /etc/init.d/dictd restart
+	fi
+	exit 0
+    ;;

-
      upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
          exit 0;
      ;;

I hope that's it and fits policy properly.

Kind regards

        Andreas.

-- 
http://fam-tille.de





More information about the debian-science-maintainers mailing list