blob: eeeb89942bde9b31e86362bb5cd30816dbf9956e [file] [log] [blame]
Andrew Geissler4c19ea12020-10-27 13:52:24 -05001Busybox does not support ps -p so use pgrep
2
3Upstream-Status: Inappropriate [embedded specific]
4Based on changes from Diego Sueiro <Diego.Sueiro@arm.com>
5
6Signed-off-by: Armin kuster <akuster808@gmail.com>
7
8Index: kea-1.7.10/src/bin/keactrl/keactrl.in
9===================================================================
10--- kea-1.7.10.orig/src/bin/keactrl/keactrl.in
11+++ kea-1.7.10/src/bin/keactrl/keactrl.in
12@@ -137,8 +137,8 @@ check_running() {
13 # Get the PID from the PID file (if it exists)
14 get_pid_from_file "${proc_name}"
15 if [ ${_pid} -gt 0 ]; then
16- # Use ps to check if PID is alive
17- ps -p ${_pid} 1>/dev/null
18+ # Use pgrep and grep to check if PID is alive
19+ pgrep -v 1 | grep ${_pid} 1>/dev/null
20 retcode=$?
21 if [ $retcode -eq 0 ]; then
22 # No error, so PID IS ALIVE