mirror of https://github.com/CISOfy/lynis.git
[BOOT-5104] improved parsing parameters to init process
This commit is contained in:
parent
0f9698f260
commit
b005effc32
|
@ -71,7 +71,7 @@
|
|||
case ${OS} in
|
||||
"Linux")
|
||||
if [ -f /proc/1/cmdline ]; then
|
||||
FILENAME=$(${AWKBINARY} '/(^\/|init)/ { print $1 }' /proc/1/cmdline | tr -d '\0')
|
||||
FILENAME=$(${AWKBINARY} '/(^\/|init)/ { print $1 }' /proc/1/cmdline | ${TRBINARY} '\0' ' ' | ${SEDBINARY} 's/ $//' | ${AWKBINARY} '{ print $1 }')
|
||||
LogText "Result: cmdline found = ${FILENAME}"
|
||||
ISFILE=$(echo ${FILENAME} | ${GREPBINARY} "^/")
|
||||
if [ ! -z "${ISFILE}" ]; then
|
||||
|
|
Loading…
Reference in New Issue