[openwrt/openwrt] dropbear: Name pid file by uci section name
LEDE Commits
lede-commits at lists.infradead.org
Thu Dec 12 11:02:46 PST 2024
blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a2f0cd35ac1d15e69f4897b35c049e175dd06825
commit a2f0cd35ac1d15e69f4897b35c049e175dd06825
Author: Andreas Gnau <andreas.gnau at iopsys.eu>
AuthorDate: Tue Feb 28 16:54:57 2023 +0530
dropbear: Name pid file by uci section name
Name the pidfile of each dropbear instance according to the
corresponding uci section name. This enables a 1:1 mapping between the
definition of the service instance and its process.
Signed-off-by: Andreas Gnau <andreas.gnau at iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/15177
Signed-off-by: John Crispin <john at phrozen.org>
---
package/network/services/dropbear/files/dropbear.init | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index 395237f9bc..11e89340db 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -8,7 +8,6 @@ STOP=50
USE_PROCD=1
PROG=/usr/sbin/dropbear
NAME=dropbear
-PIDCOUNT=0
extra_command "killclients" "Kill ${NAME} processes except servers and yourself"
@@ -298,8 +297,7 @@ dropbear_instance()
break
done
- PIDCOUNT="$(( ${PIDCOUNT} + 1))"
- local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+ local pid_file="/var/run/${NAME}.${1}.pid"
procd_open_instance
procd_set_param command "$PROG" -F -P "$pid_file"
More information about the lede-commits
mailing list