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:
authorTopi Miettinen <toiwoton@gmail.com>2020-03-19 16:12:04 +0300
committerTopi Miettinen <toiwoton@gmail.com>2020-03-19 16:16:37 +0300
commitf15fbfa6edf650ad359781008a799a7c5924f0f9 (patch)
tree8088bf00df9f52d897906cb4c869835cfb1e7eff /include/tests_kernel
parente5c1f2f303b1dbf56486369d09f24707ced25acb (diff)
Check if /vmlinuz is missing due to /etc/kernel-img.conf
If /etc/kernel-img.conf has the line do_symlinks=No, Debian (probably also Ubuntu) kernel packages will not update /vmlinuz etc. symlinks. In that case, guess the kernel from uname -r. Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
Diffstat (limited to 'include/tests_kernel')
-rw-r--r--include/tests_kernel3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tests_kernel b/include/tests_kernel
index 369d3727..225ab5e4 100644
--- a/include/tests_kernel
+++ b/include/tests_kernel
@@ -395,6 +395,9 @@
elif [ -e ${ROOTDIR}etc/rpi-issue ]; then
FINDKERNEL=raspberrypi-kernel
LogText "Result: ${ROOTDIR}vmlinuz missing due to Raspbian"
+ elif `${EGREPBINARY} -q 'do_symlinks.*=.*No' ${ROOTDIR}etc/kernel-img.conf`; then
+ FINDKERNEL=linux-image-$(uname -r)
+ LogText "Result: ${ROOTDIR}vmlinuz missing due to /etc/kernel-img.conf item do_symlinks = No"
else
LogText "This system is missing ${ROOTDIR}vmlinuz or ${ROOTDIR}boot/vmlinuz. Unable to check whether kernel is up-to-date."
ReportSuggestion "${TEST_NO}" "Determine why ${ROOTDIR}vmlinuz or ${ROOTDIR}boot/vmlinuz is missing on this Debian/Ubuntu system." "/vmlinuz or /boot/vmlinuz"