tags 665814 + patch
thanks

There was a change of the default runlevel configuration between version
0.5.2 and 0.5.3 (#65001). 

This leads to this problem for insserv during an upgrade from a version
<= 0.5.2 to version 0.5.3 and above.

The attached patch fix this by removing the old runlevel configuration
during preinst so that the upgrade could create the new intended one
during postinst.


Cheers,
Andreas
From 7e287aa585c50133225757b959c4961851f34134 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20R=C3=BCtten?= <andreasruet...@gmx.de>
Date: Sat, 21 Apr 2012 00:36:25 +0200
Subject: [PATCH] Fix insserv issue if upgrading from <=0.5.2

Between version 0.5.2 and 0.5.3 was a change to the runlevel configuration (#65001).
This leads to a problem for insserv during an upgrade from a version <= 0.5.2 to version 0.5.3 and above.
To fix this remove the old runlevel configuration during preinst so that the upgrade could create the new intended one during postinst.

Closes: #665814
---
 debian/iptables-persistent.preinst |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/debian/iptables-persistent.preinst b/debian/iptables-persistent.preinst
index c21da84..c4c03cb 100644
--- a/debian/iptables-persistent.preinst
+++ b/debian/iptables-persistent.preinst
@@ -5,4 +5,20 @@ set -e
 dpkg-maintscript-helper mv_conffile \
      /etc/iptables/rules /etc/iptables/rules.v4 0.0.20101230 -- "$@"
 
+case "$1" in
+    install|upgrade)
+	if dpkg --compare-versions "$2" le "0.5.2"; then
+	    update-rc.d -f iptables-persistent remove
+	fi
+	;;
+
+    abort-upgrade)
+	;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+	;;
+esac
+
 #DEBHELPER#
-- 
1.7.5.4

Attachment: signature.asc
Description: PGP signature

Reply via email to