summaryrefslogtreecommitdiffstats
path: root/network/nft/doinst.sh
diff options
context:
space:
mode:
author Duncan Roe2014-06-30 04:26:14 +0200
committer Willy Sudiarto Raharjo2014-06-30 15:10:20 +0200
commit28e7241c8c0c960f0d9077ee2808e7fa4e8417f3 (patch)
treeb84dc2a3dc70c04baf224b57e74ab34b6cb06515 /network/nft/doinst.sh
parent5fad1838a4edc9ffae9e6ea2e68a4c4e2b87180f (diff)
downloadslackbuilds-28e7241c8c0c960f0d9077ee2808e7fa4e8417f3.tar.gz
network/nft: Updated for version 0.3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/nft/doinst.sh')
-rw-r--r--network/nft/doinst.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/network/nft/doinst.sh b/network/nft/doinst.sh
new file mode 100644
index 0000000000..606a6d8d20
--- /dev/null
+++ b/network/nft/doinst.sh
@@ -0,0 +1,21 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/nftables/bridge-filter.new
+config etc/nftables/ipv4-filter.new
+config etc/nftables/ipv4-mangle.new
+config etc/nftables/ipv6-nat.new
+config etc/nftables/ipv6-mangle.new
+config etc/nftables/ipv4-nat.new
+config etc/nftables/ipv6-filter.new
+config etc/nftables/inet-filter.new