From: Dinko Korunic Date: Mon, 24 Sep 2007 13:50:10 +0000 (+0000) Subject: r10: - touch inactive rule X-Git-Tag: v1.4.8~9 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=a10ac83218b772a9ded3059d49407869b108bce2;p=iptables-cn.git r10: - touch inactive rule - save active anyway --- diff --git a/debian/postinst b/debian/postinst index 2beb6a1..81d185d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -51,8 +51,14 @@ if [ ! -e /var/lib/iptables/active ]; then if ! iptables-save | grep '^-' >/dev/null; then echo "CN: Netfilter rules empty: importing SSH bruteforce rules" . /usr/share/doc/iptables-cn/examples/ssh-bruteforce - iptables-save > /var/lib/iptables/active fi + echo "CN: Saving current Netfilter rules to /var/lib/iptables/active" + iptables-save > /var/lib/iptables/active +fi + +# create inactive +if [ ! -e /var/lib/iptables/inactive ]; then + touch /var/lib/iptables/inactive fi # dh_installdeb will replace this with shell code automatically