Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-04-07 20:03:21 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-04-07 20:03:21 +0300
commit08ecd911801dd90215ab885e690dec3686cf1d36 (patch)
treed671d59db6fd9b0b2a7135dde2d3e9de27753b0d
parent1a1d736fa7baee2983ae7b8452c64fb342313c32 (diff)
Use ps instead of pgrep on AIX
-rw-r--r--include/functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions b/include/functions
index c1df0fbf..e3a09c0c 100644
--- a/include/functions
+++ b/include/functions
@@ -1284,7 +1284,8 @@
if [ -z "${search}" ]; then ExitFatal "Missing process to search for when using IsRunning function"; fi
RUNNING=0
- if [ ! -z "${PGREPBINARY}" ]; then
+ # AIX does not fully support pgrep options, so using ps instead
+ if [ ! -z "${PGREPBINARY}" -a ! "${OS}" = "AIX" ]; then
FIND=$(${PGREPBINARY} ${pgrep_options} "${search}" | ${TRBINARY} '\n' ' ')
else
if [ -z "${PSOPTIONS}" ]; then