diff options
author | Mike Frysinger <vapier@chromium.org> | 2021-02-09 10:48:43 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-02-09 10:58:04 -0500 |
commit | 183aaaf64658625cb006b7cadb33e3a27e8fa496 (patch) | |
tree | 90defebc60502eac7b98d0699638dbaa23129fc4 /net-firewall/ebtables | |
parent | net-firewall/ebtables: make logger usage optional #514970 (diff) | |
download | gentoo-183aaaf64658625cb006b7cadb33e3a27e8fa496.tar.gz gentoo-183aaaf64658625cb006b7cadb33e3a27e8fa496.tar.bz2 gentoo-183aaaf64658625cb006b7cadb33e3a27e8fa496.zip |
net-firewall/ebtables: switch init to checkpath #603268
This makes the code a little simpler & more robust, and avoids
creating /var paths at install time.
Fixes: https://bugs.gentoo.org/603268
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'net-firewall/ebtables')
-rw-r--r-- | net-firewall/ebtables/ebtables-2.0.11-r3.ebuild | 1 | ||||
-rw-r--r-- | net-firewall/ebtables/files/ebtables.initd-r1 | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild b/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild index 798135864def..467b9d7f3fdb 100644 --- a/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild +++ b/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild @@ -70,7 +70,6 @@ src_install() { if ! use static; then emake DESTDIR="${D}" install - keepdir /var/lib/ebtables/ newinitd "${FILESDIR}"/ebtables.initd-r1 ebtables newconfd "${FILESDIR}"/ebtables.confd-r1 ebtables diff --git a/net-firewall/ebtables/files/ebtables.initd-r1 b/net-firewall/ebtables/files/ebtables.initd-r1 index 1860187b7dec..bdc0987b1b2b 100644 --- a/net-firewall/ebtables/files/ebtables.initd-r1 +++ b/net-firewall/ebtables/files/ebtables.initd-r1 @@ -13,6 +13,7 @@ depend() { } ebtables_tables() { + local table for table in filter nat broute; do if ${ebtables_bin} -t ${table} -L > /dev/null 2>&1; then printf '%s' "${table} " @@ -79,8 +80,8 @@ reload() { save() { ebegin "Saving ebtables state" - touch "${ebtables_save}" - chmod 0600 "${ebtables_save}" + checkpath -d -m 0755 "${ebtables_save%/*}" + checkpath -f -m 0600 "${ebtables_save}" ${ebtables_bin}-save $(ebtables_tables) ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}" eend $? } |