Skip to content

Commit

Permalink
dropbear: init: replace backticks with $()
Browse files Browse the repository at this point in the history
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[add commit description]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
  • Loading branch information
rsalvaterra authored and adschm committed Jun 30, 2020
1 parent 33fae84 commit 69ca308
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package/network/services/dropbear/files/dropbear.init
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" || {
Expand Down

0 comments on commit 69ca308

Please sign in to comment.