From f48b7aa6e48bb649846f78f9e6e44ac71f63ab9b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 12 Dec 2014 14:52:24 +0000 Subject: [PATCH] igmpproxy: do not start instance if no upstream interface is available Signed-off-by: Felix Fietkau SVN-Revision: 43659 --- package/network/services/igmpproxy/files/igmpproxy.init | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init index 44f3f64c3ef3..dd2e430b516c 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 -- 2.30.2