diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-12-12 14:52:24 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-12-12 14:52:24 +0000 |
commit | 6a219920115f9025854dfe10edcdb95c4b4e72a4 (patch) | |
tree | 65a6f16cc189ca5d8d5f8ca0cb888c1f35091bbf | |
parent | dfd221ae149e7f364fe72af1a9d70bc244ef3d7d (diff) | |
download | master-187ad058-6a219920115f9025854dfe10edcdb95c4b4e72a4.tar.gz master-187ad058-6a219920115f9025854dfe10edcdb95c4b4e72a4.tar.bz2 master-187ad058-6a219920115f9025854dfe10edcdb95c4b4e72a4.zip |
igmpproxy: do not start instance if no upstream interface is available
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43659 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/network/services/igmpproxy/files/igmpproxy.init | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init index 44f3f64c3e..dd2e430b51 100644 --- a/package/network/services/igmpproxy/files/igmpproxy.init +++ b/package/network/services/igmpproxy/files/igmpproxy.init @@ -48,6 +48,8 @@ igmp_add_phyint() { return; } + [[ "$direction" = "upstream" ]] && has_upstream=1 + echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf if [ -n "$altnets" ]; then @@ -104,11 +106,14 @@ service_triggers() { } start_service() { + has_upstream= config_load igmpproxy - procd_open_instance config_foreach igmp_header igmpproxy config_foreach igmp_add_phyint phyint + [ -n "$has_upstream" ] || return + + procd_open_instance procd_set_param command $PROG [ -n "$OPTIONS" ] && procd_append_param $OPTIONS procd_append_param command $CONFIGFILE |