mirror of https://github.com/hak5/openwrt-owl.git
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>owl
parent
9c402d03e6
commit
3f20fd4ee0
|
@ -35,8 +35,6 @@ TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
||||||
define Package/relayd/install
|
define Package/relayd/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/relayd $(1)/usr/sbin/relayd
|
$(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_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/relay.init $(1)/etc/init.d/relayd
|
$(INSTALL_BIN) ./files/relay.init $(1)/etc/init.d/relayd
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
/etc/init.d/relayd enabled && /etc/init.d/relayd start
|
|
|
@ -20,6 +20,7 @@ validate_proto_relayd()
|
||||||
resolve_ifname() {
|
resolve_ifname() {
|
||||||
grep -qs "^ *$1:" /proc/net/dev && {
|
grep -qs "^ *$1:" /proc/net/dev && {
|
||||||
procd_append_param command -I "$1"
|
procd_append_param command -I "$1"
|
||||||
|
procd_append_param netdev "$1"
|
||||||
append ifaces "$1"
|
append ifaces "$1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,6 +107,7 @@ start_relay() {
|
||||||
service_triggers()
|
service_triggers()
|
||||||
{
|
{
|
||||||
procd_add_reload_trigger "network"
|
procd_add_reload_trigger "network"
|
||||||
|
procd_add_raw_trigger "interface.*" 2000 /etc/init.d/relayd reload
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
|
|
Loading…
Reference in New Issue