[KRNL-5830] derive kernel version from filename after obtaining symlink target

This commit is contained in:
Michael Boelen 2019-12-23 15:41:26 +01:00
parent ab4291242d
commit b7da40c6ae
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04

View File

@ -645,7 +645,7 @@
LogText "Result: found symlink ${ROOTDIR}boot/vmlinuz-linux"
FOUND_VMLINUZ=$(readlink ${ROOTDIR}boot/vmlinuz-linux)
LogText "Result: symlinked target is ${FOUND_VMLINUZ}"
VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | sed 's/^vmlinuz-//')
VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's/^vmlinuz-//')
elif [ -f ${ROOTDIR}boot/vmlinuz-linux-lts ]; then
LogText "Result: found boot/vmlinuz-linux-lts"
FOUND_VMLINUZ=${ROOTDIR}boot/vmlinuz-linux-lts
@ -658,10 +658,11 @@
LogText "Result: found a symlink, retrieving destination"
FOUND_VMLINUZ=$(readlink "${FOUND_VMLINUZ}")
LogText "Result: destination file is ${FOUND_VMLINUZ}"
VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's/^vmlinuz-//')
LogText "Result: version derived from file name is '${VERSION_ON_DISK}'"
fi
if [ -z "${VERSION_ON_DISK}" ]; then
LogText "Result: found ${FOUND_VMLINUZ}"
LogText "Test: checking kernel version on disk"
NEXTLINE=0