summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-12-27 13:19:46 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-27 13:20:33 +0100
commit3f20fd4ee0a5450fcbacab56f337e5cf3dd5991f (patch)
tree4f8b501d3a91ad2ef7d75759148007c986548a2a
parent9c402d03e6e171061e2114d8908e6ada9745b571 (diff)
downloadmtk-20170518-3f20fd4ee0a5450fcbacab56f337e5cf3dd5991f.zip
mtk-20170518-3f20fd4ee0a5450fcbacab56f337e5cf3dd5991f.tar.gz
mtk-20170518-3f20fd4ee0a5450fcbacab56f337e5cf3dd5991f.tar.bz2
relayd: fix reload / interface restart issues
- replace the hotplug script with an interface trigger - add netdev params to procd to trigger restart Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/services/relayd/Makefile2
-rw-r--r--package/network/services/relayd/files/relay.hotplug2
-rw-r--r--package/network/services/relayd/files/relay.init2
3 files changed, 2 insertions, 4 deletions
diff --git a/package/network/services/relayd/Makefile b/package/network/services/relayd/Makefile
index 8c738fb..25c56d4 100644
--- a/package/network/services/relayd/Makefile
+++ b/package/network/services/relayd/Makefile
@@ -35,8 +35,6 @@ TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
define Package/relayd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/relayd $(1)/usr/sbin/relayd
- $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
- $(INSTALL_DATA) ./files/relay.hotplug $(1)/etc/hotplug.d/iface/30-relay
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/relay.init $(1)/etc/init.d/relayd
endef
diff --git a/package/network/services/relayd/files/relay.hotplug b/package/network/services/relayd/files/relay.hotplug
deleted file mode 100644
index afffbfe..0000000
--- a/package/network/services/relayd/files/relay.hotplug
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/etc/init.d/relayd enabled && /etc/init.d/relayd start
diff --git a/package/network/services/relayd/files/relay.init b/package/network/services/relayd/files/relay.init
index c628863..e5715a5 100644
--- a/package/network/services/relayd/files/relay.init
+++ b/package/network/services/relayd/files/relay.init
@@ -20,6 +20,7 @@ validate_proto_relayd()
resolve_ifname() {
grep -qs "^ *$1:" /proc/net/dev && {
procd_append_param command -I "$1"
+ procd_append_param netdev "$1"
append ifaces "$1"
}
}
@@ -106,6 +107,7 @@ start_relay() {
service_triggers()
{
procd_add_reload_trigger "network"
+ procd_add_raw_trigger "interface.*" 2000 /etc/init.d/relayd reload
}
start_service() {