summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnet-firewall/iptables/files/iptables-r2.init (renamed from net-firewall/iptables/files/iptables-r1.init)10
-rw-r--r--net-firewall/iptables/iptables-1.8.2-r2.ebuild (renamed from net-firewall/iptables/iptables-1.8.2-r1.ebuild)2
2 files changed, 9 insertions, 3 deletions
diff --git a/net-firewall/iptables/files/iptables-r1.init b/net-firewall/iptables/files/iptables-r2.init
index 708dcce6d3c7..3dcabb0dfb41 100755
--- a/net-firewall/iptables/files/iptables-r1.init
+++ b/net-firewall/iptables/files/iptables-r2.init
@@ -64,7 +64,6 @@ checkconfig() {
}
start_pre() {
- checkkernel || return 1
checkconfig || return 1
}
@@ -135,7 +134,14 @@ save() {
}
panic() {
- checkkernel || return 1
+ # use iptables autoload capability to load at least all required
+ # modules and filter table
+ ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -S >/dev/null
+ if [ $? -ne 0 ] ; then
+ eerror "${iptables_bin} failed to load"
+ return 1
+ fi
+
if service_started ${iptables_name}; then
rc-service ${iptables_name} stop
fi
diff --git a/net-firewall/iptables/iptables-1.8.2-r1.ebuild b/net-firewall/iptables/iptables-1.8.2-r2.ebuild
index 9279db2ecc56..3a922d3ad650 100644
--- a/net-firewall/iptables/iptables-1.8.2-r1.ebuild
+++ b/net-firewall/iptables/iptables-1.8.2-r2.ebuild
@@ -98,7 +98,7 @@ src_install() {
doins include/iptables/internal.h
keepdir /var/lib/iptables
- newinitd "${FILESDIR}"/${PN}-r1.init iptables
+ newinitd "${FILESDIR}"/${PN}-r2.init iptables
newconfd "${FILESDIR}"/${PN}-r1.confd iptables
if use ipv6 ; then
keepdir /var/lib/ip6tables