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>2019-12-23 17:36:26 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-12-23 17:36:26 +0300
commitab4291242da0304552d585844506ecbaa310e765 (patch)
tree029ade0c74540501ce063dc4b11d12ded7134706 /include/tests_kernel
parente5091772c531d1339f6526fb0307ff5189724523 (diff)
[KRNL-5830] check for symlink
Diffstat (limited to 'include/tests_kernel')
-rw-r--r--include/tests_kernel7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/tests_kernel b/include/tests_kernel
index 23f7823f..2c2c860f 100644
--- a/include/tests_kernel
+++ b/include/tests_kernel
@@ -654,7 +654,14 @@
FOUND_VMLINUZ=$(ls -t ${ROOTDIR}boot/vm[l-]* 2> /dev/null | head -1)
fi
+ if [ -L "${FOUND_VMLINUZ}" ]; then
+ LogText "Result: found a symlink, retrieving destination"
+ FOUND_VMLINUZ=$(readlink "${FOUND_VMLINUZ}")
+ LogText "Result: destination file is ${FOUND_VMLINUZ}"
+ fi
+
if [ -z "${VERSION_ON_DISK}" ]; then
+
LogText "Result: found ${FOUND_VMLINUZ}"
LogText "Test: checking kernel version on disk"
NEXTLINE=0