diff options
Diffstat (limited to 'meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch')
-rw-r--r-- | meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch new file mode 100644 index 0000000000..eeeb89942b --- /dev/null +++ b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Busybox does not support ps -p so use pgrep | ||
2 | |||
3 | Upstream-Status: Inappropriate [embedded specific] | ||
4 | Based on changes from Diego Sueiro <Diego.Sueiro@arm.com> | ||
5 | |||
6 | Signed-off-by: Armin kuster <akuster808@gmail.com> | ||
7 | |||
8 | Index: 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 | ||