aboutsummaryrefslogtreecommitdiff
path: root/network/arno-iptables-firewall/doinst.sh
diff options
context:
space:
mode:
authorPhilip Lacroix <philnx@bluebottle.com>2014-03-12 07:29:12 +0700
committerErik Hanson <erik@slackbuilds.org>2014-03-12 12:42:52 -0500
commit26e1286f3a1530d581150b2aceb22300968dbb99 (patch)
tree1f83029ab263968ff84807b8d2a495c10e6c30c6 /network/arno-iptables-firewall/doinst.sh
parent564e1f2a5bd9245600ccf321960bc85607c88555 (diff)
network/arno-iptables-firewall: Added (a front-end for iptables).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/arno-iptables-firewall/doinst.sh')
-rw-r--r--network/arno-iptables-firewall/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/arno-iptables-firewall/doinst.sh b/network/arno-iptables-firewall/doinst.sh
new file mode 100644
index 0000000000000..5129a9435f7d6
--- /dev/null
+++ b/network/arno-iptables-firewall/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+CONFIG=${CONFIG:-/etc/arno-iptables-firewall}
+for conf in $( find $CONFIG -name *.new ) ; do
+ config ${conf}
+done