diff options
Diffstat (limited to 'network/arno-iptables-firewall/doinst.sh')
-rw-r--r-- | network/arno-iptables-firewall/doinst.sh | 14 |
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 |