Author: blogic
Date: 2014-06-06 11:34:38 +0200 (Fri, 06 Jun 2014)
New Revision: 41032

Modified:
   trunk/package/network/services/igmpproxy/files/igmpproxy.init
Log:
igmpproxy: report an error and dont start the instance if one of the interfaces 
is not up

Signed-off-by: John Crispin <[email protected]>

Modified: trunk/package/network/services/igmpproxy/files/igmpproxy.init
===================================================================
--- trunk/package/network/services/igmpproxy/files/igmpproxy.init       
2014-06-06 09:34:30 UTC (rev 41031)
+++ trunk/package/network/services/igmpproxy/files/igmpproxy.init       
2014-06-06 09:34:38 UTC (rev 41032)
@@ -42,8 +42,12 @@
        json_load "$(ifstatus $network)"
        json_get_var device l3_device
        json_get_var up up
-       [ -n "$device" -a "$up" = "1" ] || return;
 
+       [ -n "$device" -a "$up" = "1" ] || {
+               procd_append_param error "$network is not up"
+               return;
+       }
+
        echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> 
/var/etc/igmpproxy.conf
 
        if [ -n "$altnets" ]; then
@@ -68,10 +72,9 @@
 start_service() {
        config_load igmpproxy
 
+       procd_open_instance
        config_foreach igmp_header igmpproxy
        config_foreach igmp_add_phyint phyint
-
-       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