Author: nbd
Date: 2014-12-12 15:52:24 +0100 (Fri, 12 Dec 2014)
New Revision: 43659

Modified:
   trunk/package/network/services/igmpproxy/files/igmpproxy.init
Log:
igmpproxy: do not start instance if no upstream interface is available

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/package/network/services/igmpproxy/files/igmpproxy.init
===================================================================
--- trunk/package/network/services/igmpproxy/files/igmpproxy.init       
2014-12-12 14:52:18 UTC (rev 43658)
+++ trunk/package/network/services/igmpproxy/files/igmpproxy.init       
2014-12-12 14:52:24 UTC (rev 43659)
@@ -48,6 +48,8 @@
                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 @@
 }
 
 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
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to