Package: iptables-persistent
Version: 0.5.1-coolcold-1
Severity: important
Tags: patch


If ip_tables module is not loaded, so there is no /proc/net/ip_tables_names 
file and so
iptables-save fails. This is almost okay except for the case where 
configuration of
package occurs - installation is broken, like:

root@epsilon:~# apt-get install iptables-persistent
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libapt-pkg-perl
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  iptables-persistent
0 upgraded, 1 newly installed, 0 to remove and 56 not upgraded.
Need to get 7202B of archives.
After this operation, 90.1kB of additional disk space will be used.
Get:1 http://repo.coolcold.org lenny-coolcold/main iptables-persistent 
0.5.1-coolcold-1 [7202B]
Fetched 7202B in 0s (183kB/s)
Preconfiguring packages ...
Selecting previously deselected package iptables-persistent.
(Reading database ... 44784 files and directories currently installed.)
Unpacking iptables-persistent (from 
.../iptables-persistent_0.5.1-coolcold-1_all.deb) ...
Setting up iptables-persistent (0.5.1-coolcold-1) ...
iptables-save v1.4.2: Unable to open /proc/net/ip_tables_names: No such file or 
directory

dpkg: error processing iptables-persistent (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 iptables-persistent
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@epsilon:~# iptables-save
iptables-save v1.4.2: Unable to open /proc/net/ip_tables_names: No such file or 
directory


below is small patch which i believe should help.
Thanks in advance.

P.S. I've took iptables-persistent from 
http://ftp.de.debian.org/debian/pool/main/i/iptables-persistent/iptables-persistent_0.5.1.tar.gz
and did backport to lenny (changed debhelper version dependancy in control file)

--- iptables-persistent.postinst        2011-03-05 12:19:23.000000000 +0000
+++ iptables-persistent.postinst.new    2011-03-25 17:09:35.000000000 +0000
@@ -16,11 +16,11 @@
     if [ "x$RET" != "xtrue" ]; then
         db_get iptables-persistent/autosave_v4 || true
         if [ "x$RET" = "xtrue" ]; then
-            iptables-save > /etc/iptables/rules.v4
+            iptables-save > /etc/iptables/rules.v4 || true
         fi
         db_get iptables-persistent/autosave_v6 || true
         if [ "x$RET" = "xtrue" ]; then
-            ip6tables-save > /etc/iptables/rules.v6
+            ip6tables-save > /etc/iptables/rules.v6 || true
         fi

         db_set iptables-persistent/autosave_done true || true


-- System Information:
Debian Release: 5.0.7
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-bpo.5-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages iptables-persistent depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  iptables                      1.4.2-6    administration tools for packet fi
ii  lsb-base                      3.2-20     Linux Standard Base 3.2 init scrip

iptables-persistent recommends no packages.

iptables-persistent suggests no packages.

-- debconf information:
* iptables-persistent/autosave_v6: true
* iptables-persistent/autosave_v4: true



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to