diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-06-30 09:27:47 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-06-30 09:39:17 +0200 |
commit | 139c59e8efd24827e28abe21b2053a591ca082f4 (patch) | |
tree | 6a97992aa869316a8942d8dbdfc4b289299d5906 /net-misc | |
parent | net-misc/miniupnpd: Invert boolean for calling iptables (diff) | |
download | gentoo-139c59e8efd24827e28abe21b2053a591ca082f4.tar.gz gentoo-139c59e8efd24827e28abe21b2053a591ca082f4.tar.bz2 gentoo-139c59e8efd24827e28abe21b2053a591ca082f4.zip |
net-misc/miniupnpd: Support running ip6tables setup scripts
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/miniupnpd/files/miniupnpd-conf.d-r2 | 3 | ||||
-rw-r--r-- | net-misc/miniupnpd/files/miniupnpd-init.d-r2 | 8 | ||||
-rw-r--r-- | net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild | 6 |
3 files changed, 15 insertions, 2 deletions
diff --git a/net-misc/miniupnpd/files/miniupnpd-conf.d-r2 b/net-misc/miniupnpd/files/miniupnpd-conf.d-r2 index 2ebd8c56b57e..d0f5ce40cdc6 100644 --- a/net-misc/miniupnpd/files/miniupnpd-conf.d-r2 +++ b/net-misc/miniupnpd/files/miniupnpd-conf.d-r2 @@ -8,3 +8,6 @@ # enable manipulating iptables on start/stop iptables_scripts=1 + +# enable manipulating ip6tables on start/stop +ip6tables_scripts=1 diff --git a/net-misc/miniupnpd/files/miniupnpd-init.d-r2 b/net-misc/miniupnpd/files/miniupnpd-init.d-r2 index 8b9f0579f223..4671ba067c45 100644 --- a/net-misc/miniupnpd/files/miniupnpd-init.d-r2 +++ b/net-misc/miniupnpd/files/miniupnpd-init.d-r2 @@ -9,7 +9,7 @@ command_args="-f ${config_file:-/etc/miniupnpd/miniupnpd.conf} ${extra_args}" depend() { need net - use iptables minissdpd + use iptables ip6tables minissdpd } start_pre() { @@ -18,6 +18,9 @@ start_pre() { if [ -n "${iptables_scripts}" ]; then /etc/miniupnpd/iptables_init.sh || retval=${?} fi + if [ -n "${ip6tables_scripts}" ]; then + /etc/miniupnpd/ip6tables_init.sh || retval=${?} + fi return ${retval} } @@ -28,6 +31,9 @@ stop_post() { if [ -n "${iptables_scripts}" ]; then /etc/miniupnpd/iptables_removeall.sh fi + if [ -n "${ip6tables_scripts}" ]; then + /etc/miniupnpd/ip6tables_removeall.sh + fi return ${retval} } diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild index 30de1d75b8f0..3aaa9a02a94f 100644 --- a/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild +++ b/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild @@ -55,8 +55,12 @@ src_compile() { src_install() { emake PREFIX="${ED}" STRIP=true install + local confd_seds=( -e ': noop' ) + use ipv6 || confd_seds+=( -e 's/^ip6tables_scripts=/#&/' ) + newinitd "${FILESDIR}"/${PN}-init.d-r2 ${PN} - newconfd "${FILESDIR}"/${PN}-conf.d-r2 ${PN} + newconfd - ${PN} < <(sed "${confd_seds[@]}" \ + "${FILESDIR}"/${PN}-conf.d-r2 || die) } pkg_postinst() { |