[debhelper-devel] [debhelper] 01/02: postrm-init: Tweak to avoid triggering a lintian warning

Niels Thykier nthykier at moszumanska.debian.org
Sat Nov 7 10:34:14 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 2059ab8e431cd7ba8392f79c70950e44ce04dc64
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Nov 7 10:33:32 2015 +0100

    postrm-init: Tweak to avoid triggering a lintian warning
    
    Lintian should be updated to accept two calls to update-rc.d
    eventually.  But in the mean time, rewrite the script so we do not
    trigger a lintian warning.
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 autoscripts/postrm-init | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init
index 9881b1c..978bcf5 100644
--- a/autoscripts/postrm-init
+++ b/autoscripts/postrm-init
@@ -1,12 +1,13 @@
-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
+if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then
+	_action=remove
+	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)
+		_action=disable
+	fi
+	update-rc.d #SCRIPT# ${_action} >/dev/null
 fi
 
 

-- 
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