igmpproxy: remove some bashism
[openwrt/staging/wigyori.git] / package / network / services / igmpproxy / files / igmpproxy.init
index c4af43068145de4121e3ae98184e5c191ee00b3b..14d7133e5760d932bdb32608ec1e0650964f166d 100644 (file)
@@ -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
        }