[debhelper-devel] [debhelper] 01/01: dh_installinit: Disable init scripts on removal

Niels Thykier nthykier at moszumanska.debian.org
Fri Nov 6 22:14:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 0f09b1f88b36eeb99d0b7df8ae2702442e03b45f
Author: Niels Thykier <niels at thykier.net>
Date:   Fri Nov 6 23:13:34 2015 +0100

    dh_installinit: Disable init scripts on removal
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 autoscripts/postrm-init | 11 +++++++++--
 debian/changelog        |  2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init
index 6f5bb09..9881b1c 100644
--- a/autoscripts/postrm-init
+++ b/autoscripts/postrm-init
@@ -1,10 +1,17 @@
+if [ "$1" = "remove" ] ; then
+	# Attempt to disable but ignore failures as it is not
+	# required (and the script must be a able to handle
+	# being called while the package is removed, but not
+	# yet purged)
+	update-rc.d #SCRIPT# disable >/dev/null || true
+fi
 if [ "$1" = "purge" ] ; then
 	update-rc.d #SCRIPT# remove >/dev/null
 fi
 
 
-# In case this system is running systemd, we make systemd reload the unit files
-# to pick up changes.
+# In case this system is running systemd, we make systemd reload the
+# unit files to pick up changes.
 if [ -d /run/systemd/system ] ; then
 	systemctl --system daemon-reload >/dev/null || true
 fi
diff --git a/debian/changelog b/debian/changelog
index 46750fc..048c86a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,8 @@ debhelper (9.20151005) unstable; urgency=medium
   * qmake.pm: Apply patch from Sergio Durigan Junior to
     create the build dir if it doesn't exist.
     (Closes: #800738)
+  * dh_installinit: Disable initscripts when a package is
+    removed (but not yet purged).  (Closes: #749400)
 
   [ Translations ]
   * Update German translation (Chris Leick)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list