aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorSven Roederer <devel-sven@geroedel.de>2019-12-25 19:20:10 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-06-23 20:00:16 +0200
commit7e67d144868b716fc1d9b256e57d9f83b8acd9cd (patch)
treeb50a276ea2f7053ac1d9c6e532b9f9a6a6798571 /package/network
parent492a6594b97e765a2a93fadbe23534ae94f710fa (diff)
downloadupstream-7e67d144868b716fc1d9b256e57d9f83b8acd9cd.tar.gz
upstream-7e67d144868b716fc1d9b256e57d9f83b8acd9cd.tar.bz2
upstream-7e67d144868b716fc1d9b256e57d9f83b8acd9cd.zip
igmpproxy: remove some bashism
"[[" is a bash extension for test. As the ash-implementation is not fully compatible we drop its usage. This follows up 3519bf4976b41c As a result, we also need to move the and/or out of the test brackets. Signed-off-by: Sven Roederer <devel-sven@geroedel.de> [squash from two patches, adjust commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/igmpproxy/files/igmpproxy.init8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init
index c4af430681..14d7133e57 100644
--- a/package/network/services/igmpproxy/files/igmpproxy.init
+++ b/package/network/services/igmpproxy/files/igmpproxy.init
@@ -43,7 +43,7 @@ igmp_add_phyint() {
append netdevs "$device"
- [[ "$direction" = "upstream" ]] && has_upstream=1
+ [ "$direction" = "upstream" ] && has_upstream=1
echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
@@ -66,7 +66,9 @@ igmp_add_firewall_routing() {
config_get direction $1 direction
config_get zone $1 zone
- [[ "$direction" = "downstream" && ! -z "$zone" ]] || return 0
+ if [ "$direction" != "downstream" ] || [ -z "$zone" ]; then
+ return 0
+ fi
# First drop SSDP packets then accept all other multicast
@@ -105,7 +107,7 @@ igmp_add_firewall_network() {
json_add_string target ACCEPT
json_close_object
- [[ "$direction" = "upstream" ]] && {
+ [ "$direction" = "upstream" ] && {
upstream="$zone"
config_foreach igmp_add_firewall_routing phyint
}