diff options
author | Duncan Roe <duncan_roe@acslink.net.au> | 2014-06-30 09:26:14 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-06-30 20:10:20 +0700 |
commit | 28e7241c8c0c960f0d9077ee2808e7fa4e8417f3 (patch) | |
tree | b84dc2a3dc70c04baf224b57e74ab34b6cb06515 /network/nft/doinst.sh | |
parent | 5fad1838a4edc9ffae9e6ea2e68a4c4e2b87180f (diff) |
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.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/network/nft/doinst.sh b/network/nft/doinst.sh new file mode 100644 index 0000000000000..606a6d8d2079b --- /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 |