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>2018-08-22 17:38:54 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-08-22 17:38:54 +0300
commitafaae509897a0cf2516e68bb60353a4530ff5651 (patch)
treeb6ee2bde6fba3499bc2036cb8a904e4f3c3b185e /include/tests_boot_services
parent467932bc569d65581261d7d6a039634bd39fc66b (diff)
[BOOT-5104] extended logging
Diffstat (limited to 'include/tests_boot_services')
-rw-r--r--include/tests_boot_services6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services
index 274fd2d3..bce0bd02 100644
--- a/include/tests_boot_services
+++ b/include/tests_boot_services
@@ -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