From: John Crispin Date: Fri, 6 Jun 2014 09:34:38 +0000 (+0000) Subject: igmpproxy: report an error and dont start the instance if one of the interfaces is... X-Git-Tag: v19.07.0-rc1~17673 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1352b866279930f5ba0e30aa6d2f50b2e69e8e1d;p=openwrt%2Fstaging%2Fhauke.git igmpproxy: report an error and dont start the instance if one of the interfaces is not up Signed-off-by: John Crispin SVN-Revision: 41032 --- diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init index 58b4377a9d..fb0333f048 100644 --- a/package/network/services/igmpproxy/files/igmpproxy.init +++ b/package/network/services/igmpproxy/files/igmpproxy.init @@ -42,7 +42,11 @@ igmp_add_phyint() { 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 @@ -68,10 +72,9 @@ service_triggers() { 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