dropbear: init: replace backticks with $()
authorRui Salvaterra <rsalvaterra@gmail.com>
Tue, 30 Jun 2020 16:22:10 +0000 (17:22 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 30 Jun 2020 17:01:18 +0000 (19:01 +0200)
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>
package/network/services/dropbear/files/dropbear.init

index daf111fadbf806d3c96024ed8e42ff6f81610a1a..ab8e908d8c6bdd2efdc7e1ae5306dd723a262f76 100755 (executable)
@@ -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" || {