mirror of https://github.com/hak5/openwrt.git
dropbear: init: replace backticks with $()
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>master
parent
33fae8421e
commit
69ca308673
|
@ -238,7 +238,7 @@ killclients()
|
||||||
while [ "${pid}" -ne 0 ]
|
while [ "${pid}" -ne 0 ]
|
||||||
do
|
do
|
||||||
# get parent process id
|
# get parent process id
|
||||||
pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
|
pid=$(cut -d ' ' -f 4 "/proc/${pid}/stat")
|
||||||
[ "${pid}" -eq 0 ] && break
|
[ "${pid}" -eq 0 ] && break
|
||||||
|
|
||||||
# check if client connection
|
# check if client connection
|
||||||
|
@ -249,14 +249,14 @@ killclients()
|
||||||
done
|
done
|
||||||
|
|
||||||
# get all server pids that should be ignored
|
# 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
|
do
|
||||||
append ignore "${server}"
|
append ignore "${server}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# get all running pids and kill client connections
|
# get all running pids and kill client connections
|
||||||
local skip
|
local skip
|
||||||
for pid in `pidof "${NAME}"`
|
for pid in $(pidof "${NAME}")
|
||||||
do
|
do
|
||||||
# check if correct program, otherwise process next pid
|
# check if correct program, otherwise process next pid
|
||||||
grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
|
grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
|
||||||
|
|
Loading…
Reference in New Issue