Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: Remove some bashism #2647

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions package/network/services/igmpproxy/files/igmpproxy.init
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
}
Expand Down