aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-06-06 09:34:38 +0000
committerJohn Crispin <blogic@openwrt.org>2014-06-06 09:34:38 +0000
commitaeeb870b02b43a1b3505f6fe1ad04d02cba79329 (patch)
treee4e04f040eb75c9a946311d17db64480c856b667 /package/network
parent16eceec6c4c2a2ab621615e2de46a80117f572f3 (diff)
downloadmaster-187ad058-aeeb870b02b43a1b3505f6fe1ad04d02cba79329.tar.gz
master-187ad058-aeeb870b02b43a1b3505f6fe1ad04d02cba79329.tar.bz2
master-187ad058-aeeb870b02b43a1b3505f6fe1ad04d02cba79329.zip
igmpproxy: report an error and dont start the instance if one of the interfaces is not up
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41032 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/igmpproxy/files/igmpproxy.init9
1 files changed, 6 insertions, 3 deletions
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