summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch')
-rw-r--r--meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch27
1 files changed, 17 insertions, 10 deletions
diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
index eeeb89942b..63a6a2805b 100644
--- a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
+++ b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
@@ -1,22 +1,29 @@
1Busybox does not support ps -p so use pgrep 1From c878a356712606549f7f188b62f7d1cae08a176e Mon Sep 17 00:00:00 2001
2From: Armin kuster <akuster808@gmail.com>
3Date: Wed, 14 Oct 2020 22:48:31 -0700
4Subject: [PATCH] Busybox does not support ps -p so use pgrep
2 5
3Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
4Based on changes from Diego Sueiro <Diego.Sueiro@arm.com> 7Based on changes from Diego Sueiro <Diego.Sueiro@arm.com>
5 8
6Signed-off-by: Armin kuster <akuster808@gmail.com> 9Signed-off-by: Armin kuster <akuster808@gmail.com>
7 10
8Index: kea-1.7.10/src/bin/keactrl/keactrl.in 11---
9=================================================================== 12 src/bin/keactrl/keactrl.in | 4 ++--
10--- kea-1.7.10.orig/src/bin/keactrl/keactrl.in 13 1 file changed, 2 insertions(+), 2 deletions(-)
11+++ kea-1.7.10/src/bin/keactrl/keactrl.in 14
12@@ -137,8 +137,8 @@ check_running() { 15diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in
16index 450e997..c353ca9 100644
17--- a/src/bin/keactrl/keactrl.in
18+++ b/src/bin/keactrl/keactrl.in
19@@ -149,8 +149,8 @@ check_running() {
13 # Get the PID from the PID file (if it exists) 20 # Get the PID from the PID file (if it exists)
14 get_pid_from_file "${proc_name}" 21 get_pid_from_file "${proc_name}"
15 if [ ${_pid} -gt 0 ]; then 22 if [ ${_pid} -gt 0 ]; then
16- # Use ps to check if PID is alive 23- # Use ps to check if PID is alive
17- ps -p ${_pid} 1>/dev/null 24- if ps -p ${_pid} 1>/dev/null; then
18+ # Use pgrep and grep to check if PID is alive 25+ # Use pgrep and grep to check if PID is alive
19+ pgrep -v 1 | grep ${_pid} 1>/dev/null 26+ if pgrep -v 1 | grep ${_pid} 1>/dev/null; then
20 retcode=$?
21 if [ $retcode -eq 0 ]; then
22 # No error, so PID IS ALIVE 27 # No error, so PID IS ALIVE
28 _running=1
29 fi