summaryrefslogtreecommitdiff
path: root/package/network/services/igmpproxy/files/igmpproxy.init
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-12-12 14:52:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-12-12 14:52:24 +0000
commitf48b7aa6e48bb649846f78f9e6e44ac71f63ab9b (patch)
tree86b75b8a7549a9dca891b56abd87c04500da72bd /package/network/services/igmpproxy/files/igmpproxy.init
parentb37dc7e7ce6f08e221d2e8063648f03d9a2e080b (diff)
downloadmtk-20170518-f48b7aa6e48bb649846f78f9e6e44ac71f63ab9b.zip
mtk-20170518-f48b7aa6e48bb649846f78f9e6e44ac71f63ab9b.tar.gz
mtk-20170518-f48b7aa6e48bb649846f78f9e6e44ac71f63ab9b.tar.bz2
igmpproxy: do not start instance if no upstream interface is available
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43659
Diffstat (limited to 'package/network/services/igmpproxy/files/igmpproxy.init')
-rw-r--r--package/network/services/igmpproxy/files/igmpproxy.init7
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 44f3f64..dd2e430 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