mirror of https://github.com/CISOfy/lynis.git
Improved boot loader detection for Grub2 [BOOT-5121]
This commit is contained in:
parent
81d910c050
commit
3d0fb8d529
|
@ -45,16 +45,21 @@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# GRUB2 configuration file
|
# GRUB2 configuration file
|
||||||
if [ -f /boot/grub/grub.cfg ]; then
|
if [ -f /boot/grub/grub.cfg -o /boot/grub2/grub.cfg ]; then
|
||||||
FOUND=1
|
FOUND=1
|
||||||
BOOT_LOADER="GRUB2"
|
BOOT_LOADER="GRUB2"
|
||||||
BOOT_LOADER_FOUND=1
|
BOOT_LOADER_FOUND=1
|
||||||
GRUB_VERSION=2
|
GRUB_VERSION=2
|
||||||
GRUBCONFFILE="/boot/grub/grub.cfg"
|
|
||||||
Display --indent 4 --text "- Checking presence GRUB2" --result FOUND --color GREEN
|
Display --indent 4 --text "- Checking presence GRUB2" --result FOUND --color GREEN
|
||||||
logtext "Result: found GRUB2 configuration file (/boot/grub/grub.cfg)"
|
if [ -f /boot/grub/grub.cfg ]; then
|
||||||
|
GRUBCONFFILE="/boot/grub/grub.cfg"
|
||||||
|
elif [ -f /boot/grub2/grub.cfg ]; then
|
||||||
|
GRUBCONFFILE="/boot/grub2/grub.cfg"
|
||||||
|
fi
|
||||||
|
logtext "Result: found GRUB2 configuration file (${GRUBCONFFILE})"
|
||||||
# YYY password check, when documentation of GRUB2 project is improved
|
# YYY password check, when documentation of GRUB2 project is improved
|
||||||
# YYY Add check permission check (600)
|
# YYY Add check permission check (600)
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Some OSes like Gentoo do not have /boot mounted by default
|
# Some OSes like Gentoo do not have /boot mounted by default
|
||||||
|
|
Loading…
Reference in New Issue