diff mbox

[OpenWrt-Devel] odhcp6c: script: only call firewall, if installed

Message ID 20150531191036.GA30000@medion.lan
State Superseded
Headers show

Commit Message

Bastian Bittorf May 31, 2015, 7:10 p.m. UTC
We dont use fw3, so i was wondering about error-messages in syslog
about fw3. check if 'fw3' is in place, before calling it.

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
---
 package/network/ipv6/odhcp6c/files/dhcpv6.script |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Steven Barth June 1, 2015, 8:33 a.m. UTC | #1
Is that okay with you as well https://dev.openwrt.org/changeset/45867 ?

Cheers,

Steven
Bastian Bittorf June 1, 2015, 8:50 a.m. UTC | #2
* Steven Barth <cyrus@openwrt.org> [01.06.2015 10:46]:
> Is that okay with you as well https://dev.openwrt.org/changeset/45867 ?

it's ok for me, but IMHO not the proper way,
because you are hiding errors, if there are any...

bye, bastian
diff mbox

Patch

diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index a2adf39..886d643 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -118,7 +118,9 @@  setup_interface () {
 		MAPRULE="$LW4O6"
 	fi
 
-	[ -n "$ZONE" ] || ZONE=$(fw3 -q network $INTERFACE)
+	[ -n "$ZONE" ] || {
+		[ -e '/sbin/fw3' ] && ZONE=$(fw3 -q network $INTERFACE)
+	}
 
 	if [ "$IFACE_MAP" != 0 -a -n "$MAPTYPE" -a -n "$MAPRULE" ]; then
 		[ -z "$IFACE_MAP" -o "$IFACE_MAP" = 1 ] && IFACE_MAP=${INTERFACE}_4