[BOOT-5104] improved parsing parameters to init process

This commit is contained in:
Michael Boelen 2018-08-22 16:33:50 +02:00
parent 0f9698f260
commit b005effc32
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 1 additions and 1 deletions

View File

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