]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1574] shell scripts: replace pidof with pgrep
authorAndrei Pavel <andrei@isc.org>
Fri, 11 Dec 2020 12:30:46 +0000 (14:30 +0200)
committerAndrei Pavel <andrei@isc.org>
Mon, 14 Dec 2020 10:08:11 +0000 (12:08 +0200)
src/lib/testutils/dhcp_test_lib.sh.in

index bb075064e0cbfd836b30eb78fc4aed197e277757..9d12a97cbaece90849c852befbbb7179e7abbcd1 100644 (file)
@@ -449,7 +449,8 @@ kill_processes_by_name() {
     fi
     # Obtain PIDs of running processes.
     local pids
-    pids=$(pidof "${proc_name}" || true)
+    truncated_proc_name=$(printf '%s' "${proc_name}" | cut -c1-15)
+    pids=$(pgrep "${truncated_proc_name}" || true)
     # For each PID found, send kill signal.
     for pid in ${pids}
     do