[BOOT-5104] extended logging

This commit is contained in:
Michael Boelen 2018-08-22 16:38:54 +02:00
parent 467932bc56
commit afaae50989
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 4 additions and 2 deletions

View File

@ -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