diff options
author | John Crispin <john@openwrt.org> | 2014-06-05 10:56:18 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-06-05 10:56:18 +0000 |
commit | ac69d576b458462106fd1738e4afda49a51b0b3c (patch) | |
tree | d17a1bdbd6107de80aee2be7c05914b9096b9906 /package/network/services/igmpproxy | |
parent | 7a0606124a198fa04ba7a766af476d598ad80e80 (diff) | |
download | upstream-ac69d576b458462106fd1738e4afda49a51b0b3c.tar.gz upstream-ac69d576b458462106fd1738e4afda49a51b0b3c.tar.bz2 upstream-ac69d576b458462106fd1738e4afda49a51b0b3c.zip |
igmpproxy: register interface change triggers
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41011
Diffstat (limited to 'package/network/services/igmpproxy')
-rw-r--r-- | package/network/services/igmpproxy/Makefile | 2 | ||||
-rw-r--r-- | package/network/services/igmpproxy/files/igmpproxy.hotplug | 3 | ||||
-rw-r--r-- | package/network/services/igmpproxy/files/igmpproxy.init | 15 |
3 files changed, 10 insertions, 10 deletions
diff --git a/package/network/services/igmpproxy/Makefile b/package/network/services/igmpproxy/Makefile index 027fcb99d2..47b995bb51 100644 --- a/package/network/services/igmpproxy/Makefile +++ b/package/network/services/igmpproxy/Makefile @@ -51,8 +51,6 @@ define Package/igmpproxy/install $(INSTALL_CONF) ./files/igmpproxy.config $(1)/etc/config/igmpproxy $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/igmpproxy.init $(1)/etc/init.d/igmpproxy - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/igmpproxy.hotplug $(1)/etc/hotplug.d/iface/igmpproxy $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/igmpproxy $(1)/usr/sbin/ endef diff --git a/package/network/services/igmpproxy/files/igmpproxy.hotplug b/package/network/services/igmpproxy/files/igmpproxy.hotplug deleted file mode 100644 index ebe353a8b2..0000000000 --- a/package/network/services/igmpproxy/files/igmpproxy.hotplug +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/etc/init.d/igmpproxy reload diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init index 75d111f3c0..58b4377a9d 100644 --- a/package/network/services/igmpproxy/files/igmpproxy.init +++ b/package/network/services/igmpproxy/files/igmpproxy.init @@ -20,7 +20,6 @@ CONFIGFILE=/var/etc/igmpproxy.conf # OPTIONS="-v" - be verbose, this will write aditional information to syslog OPTIONS="" -UPSTREAM=0 igmp_header() { local quickleave @@ -45,8 +44,6 @@ igmp_add_phyint() { json_get_var up up [ -n "$device" -a "$up" = "1" ] || return; - UPSTREAM=1 - echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf if [ -n "$altnets" ]; then @@ -57,6 +54,13 @@ igmp_add_phyint() { fi } +igmp_add_network() { + local network + + config_get network $1 network + procd_add_interface_trigger "interface.*" $network /etc/init.d/igmpproxy restart +} + service_triggers() { procd_add_reload_trigger "igmpproxy" } @@ -67,13 +71,14 @@ start_service() { config_foreach igmp_header igmpproxy config_foreach igmp_add_phyint phyint - [ $UPSTREAM = 1 ] || return - procd_open_instance procd_set_param command $PROG [ -n "$OPTIONS" ] && procd_append_param $OPTIONS procd_append_param command $CONFIGFILE procd_set_param file $CONFIGFILE procd_set_param respawn + procd_open_trigger + config_foreach igmp_add_network phyint + procd_close_trigger procd_close_instance } |