Message ID | 20200630162208.121383-1-rsalvaterra@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | dropbear: init: replace backticks with $() | expand |
> -----Original Message----- > From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] > On Behalf Of Rui Salvaterra > Sent: Dienstag, 30. Juni 2020 18:22 > To: openwrt-devel@lists.openwrt.org > Cc: Rui Salvaterra <rsalvaterra@gmail.com> > Subject: [PATCH] dropbear: init: replace backticks with $() Merged your two patches, please add a commit description next time. Best Adrian
Hi, Adrian, On Tue, 30 Jun 2020 at 18:05, <mail@adrianschmutzler.de> wrote: > > Merged your two patches, please add a commit description next time. > Will do, thanks a lot. Cheers, Rui
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init index daf111fadb..ab8e908d8c 100755 --- a/package/network/services/dropbear/files/dropbear.init +++ b/package/network/services/dropbear/files/dropbear.init @@ -238,7 +238,7 @@ killclients() while [ "${pid}" -ne 0 ] do # get parent process id - pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"` + pid=$(cut -d ' ' -f 4 "/proc/${pid}/stat") [ "${pid}" -eq 0 ] && break # check if client connection @@ -249,14 +249,14 @@ killclients() done # get all server pids that should be ignored - for server in `cat /var/run/${NAME}.*.pid` + for server in $(cat /var/run/${NAME}.*.pid) do append ignore "${server}" done # get all running pids and kill client connections local skip - for pid in `pidof "${NAME}"` + for pid in $(pidof "${NAME}") do # check if correct program, otherwise process next pid grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> --- package/network/services/dropbear/files/dropbear.init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)