tag 492637 patch
thanks

Here's a patch to make the postinst and prerm scripts use invoke-rc.d
when it's available, per policy.

-- 
Matt                                                 http://ftbfs.org/
diff -ru bitlbee-1.2.1~/debian/postinst bitlbee-1.2.1/debian/postinst
--- bitlbee-1.2.1~/debian/postinst	2008-07-30 14:55:51.000000000 -0700
+++ bitlbee-1.2.1/debian/postinst	2008-07-30 14:57:10.000000000 -0700
@@ -64,7 +64,11 @@
 fi
 
 if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
-	/etc/init.d/bitlbee restart
+	if which invoke-rc.d >/dev/null 2>&1; then
+		invoke-rc.d bitlbee restart
+	else
+		/etc/init.d/bitlbee restart
+	fi
 fi
 
 ## If we're upgrading, we'll probably skip this next part
@@ -90,5 +94,9 @@
 fi
 
 if [ -z "$2" ]; then
-	/etc/init.d/bitlbee start
+	if which invoke-rc.d >/dev/null 2>&1; then
+		invoke-rc.d bitlbee start
+	else
+		/etc/init.d/bitlbee start
+	fi
 fi
diff -ru bitlbee-1.2.1~/debian/prerm bitlbee-1.2.1/debian/prerm
--- bitlbee-1.2.1~/debian/prerm	2008-07-30 14:55:51.000000000 -0700
+++ bitlbee-1.2.1/debian/prerm	2008-07-30 14:57:49.000000000 -0700
@@ -9,5 +9,9 @@
 		mv /usr/share/bitlbee/help.txt /usr/share/bitlbee/help.upgrading
 	fi
 else
-	/etc/init.d/bitlbee stop || exit 0
+	if which invoke-rc.d >/dev/null 2>&1; then
+		invoke-rc.d bitblee stop || exit 0
+	else
+		/etc/init.d/bitlbee stop || exit 0
+	fi
 fi

Reply via email to