diff options
author | Nicholas Vinson <nvinson234@gmail.com> | 2017-01-07 06:54:28 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-01-07 13:46:02 -0800 |
commit | 73651790d96992c366b3666e6dda1af1a62c6b0f (patch) | |
tree | b45803a4bebdf9cb9aac91c93b2663286d418628 /net-firewall | |
parent | net-firewall/nftables: add xml USE flag (diff) | |
download | gentoo-73651790d96992c366b3666e6dda1af1a62c6b0f.tar.gz gentoo-73651790d96992c366b3666e6dda1af1a62c6b0f.tar.bz2 gentoo-73651790d96992c366b3666e6dda1af1a62c6b0f.zip |
net-firewall/nftables: Fix SAVE_OPTIONS bug in libexec scripts
The libexec script doesn't honor the SAVE_OPTIONS variable. This commit fixes
that issue.
Thanks to Phil@nwl.cc for providing the fix for the issue.
Gentoo-bug: 603228
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-firewall')
-rwxr-xr-x | net-firewall/nftables/files/libexec/nftables.sh | 2 | ||||
-rw-r--r-- | net-firewall/nftables/files/nftables.init | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/net-firewall/nftables/files/libexec/nftables.sh b/net-firewall/nftables/files/libexec/nftables.sh index f720b9bfc514..cc55f8566000 100755 --- a/net-firewall/nftables/files/libexec/nftables.sh +++ b/net-firewall/nftables/files/libexec/nftables.sh @@ -27,7 +27,7 @@ main() { "store") local tmp_save="${NFTABLES_SAVE}.tmp" if ! use_legacy; then - nft list ruleset > ${tmp_save} + nft ${SAVE_OPTIONS} list ruleset > ${tmp_save} else save_legacy ${tmp_save} fi diff --git a/net-firewall/nftables/files/nftables.init b/net-firewall/nftables/files/nftables.init index 217251e41db4..cf4ab8b5f44b 100644 --- a/net-firewall/nftables/files/nftables.init +++ b/net-firewall/nftables/files/nftables.init @@ -1,6 +1,6 @@ #!/sbin/openrc-run -# Copyright 2014-2016 Nicholas Vinson -# Copyright 1999-2016 Gentoo Foundation +# Copyright 2014-2017 Nicholas Vinson +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 extra_commands="clear list panic save" @@ -83,6 +83,7 @@ save() { ebegin "Saving nftables state" checkpath -q -d "$(dirname "${NFTABLES_SAVE}")" checkpath -q -m 0600 -f "${NFTABLES_SAVE}" + export SAVE_OPTIONS /usr/libexec/nftables/nftables.sh store ${NFTABLES_SAVE} return $? } |