From 28e7241c8c0c960f0d9077ee2808e7fa4e8417f3 Mon Sep 17 00:00:00 2001 From: Duncan Roe Date: Mon, 30 Jun 2014 09:26:14 +0700 Subject: network/nft: Updated for version 0.3. Signed-off-by: Willy Sudiarto Raharjo --- network/nft/doinst.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 network/nft/doinst.sh (limited to 'network/nft/doinst.sh') 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 -- cgit v1.2.3