mirror of https://github.com/CISOfy/lynis.git
[BOOT-5104] extended logging
This commit is contained in:
parent
467932bc56
commit
afaae50989
|
@ -71,8 +71,10 @@
|
|||
case ${OS} in
|
||||
"Linux")
|
||||
if [ -f /proc/1/cmdline ]; then
|
||||
FILENAME=$(${AWKBINARY} '/(^\/|init)/ { print $1 }' /proc/1/cmdline | ${TRBINARY} '\0' ' ' | ${SEDBINARY} 's/ $//' | ${AWKBINARY} '{ print $1 }')
|
||||
LogText "Result: cmdline found = ${FILENAME}"
|
||||
OUTPUT=$(${AWKBINARY} '/(^\/|init)/ { print $1 }' /proc/1/cmdline | ${TRBINARY} '\0' ' ' | ${SEDBINARY} 's/ $//')
|
||||
LogText "Result: cmdline found = ${OUTPUT}"
|
||||
FILENAME=$(echo "${OUTPUT}" | ${AWKBINARY} '{print $1}')
|
||||
LogText "Result: file on disk = ${FILENAME}"
|
||||
ISFILE=$(echo ${FILENAME} | ${GREPBINARY} "^/")
|
||||
if [ ! -z "${ISFILE}" ]; then
|
||||
if [ -L ${ISFILE} ]; then
|
||||
|
|
Loading…
Reference in New Issue