[source] relayd: remove old start-stop-service related code

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 26 17:26:40 PST 2017


yousong pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/77fb98ee41930d96e3c5a6bdb9341df20ae3afcb

commit 77fb98ee41930d96e3c5a6bdb9341df20ae3afcb
Author: Yousong Zhou <yszhou4tech at gmail.com>
AuthorDate: Sat Feb 25 20:00:14 2017 +0800

    relayd: remove old start-stop-service related code
    
    Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/network/services/relayd/files/relay.init | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/package/network/services/relayd/files/relay.init b/package/network/services/relayd/files/relay.init
index 028b61e..ac10f48 100644
--- a/package/network/services/relayd/files/relay.init
+++ b/package/network/services/relayd/files/relay.init
@@ -21,7 +21,6 @@ resolve_ifname() {
 	grep -qs "^ *$1:" /proc/net/dev && {
 		procd_append_param command -I "$1"
 		procd_append_param netdev "$1"
-		append ifaces "$1"
 	}
 }
 
@@ -36,26 +35,12 @@ resolve_network() {
 start_relay() {
 	local cfg="$1"
 
-	local args=""
-	local ifaces=""
-
 	config_get proto "$cfg" proto
 	[ "$proto" = "relay" ] || return 0
 
 	config_get_bool disabled "$cfg" disabled 0
 	[ "$disabled" -gt 0 ] && return 0
 
-	SERVICE_DAEMONIZE=1
-	SERVICE_WRITE_PID=1
-	SERVICE_PID_FILE="/var/run/relay-$cfg.pid"
-	[ -f "$SERVICE_PID_FILE" ] && {
-		if grep -q relayd "/proc/$(cat $SERVICE_PID_FILE)/cmdline"; then
-			return 0
-		else
-			rm -f "$SERVICE_PID_FILE"
-		fi
-	}
-
 	procd_open_instance
 	procd_set_param command "$PROG"
 



More information about the lede-commits mailing list