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:
authorFlorentCoppint <FlorentCoppint@users.noreply.github.com>2017-09-16 14:58:04 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-09-16 14:58:04 +0300
commitccf9db18f85e480ed18dfd2d502b23f017fd0767 (patch)
tree4b5d4fd0ba5123ccddf1fb9c484676e6f33066f7
parent79278c32ef98fe7294ad8663c80da209d6f66a4e (diff)
Improved IsRunning() process matching (#463)
-rw-r--r--include/functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions b/include/functions
index 72ea9340..1f073112 100644
--- a/include/functions
+++ b/include/functions
@@ -1245,8 +1245,8 @@
IsRunning() {
if [ $# -eq 0 ]; then ExitFatal "Missing parameter when calling IsRunning function"; fi
RUNNING=0
- PSOPTIONS=""
- if [ ${SHELL_IS_BUSYBOX} -eq 0 ]; then PSOPTIONS=" ax"; fi
+ PSOPTIONS=" -o args="
+ if [ ${SHELL_IS_BUSYBOX} -eq 0 ]; then PSOPTIONS=" -o args= -C $1"; fi
FIND=$(${PSBINARY} ${PSOPTIONS} | egrep "( |/)$1" | grep -v "grep")
if [ ! "${FIND}" = "" ]; then
RUNNING=1