From 3d0fb8d529e69d6325742c098d7283a7d7e74e2d Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 6 Oct 2014 21:27:23 +0200 Subject: [PATCH] Improved boot loader detection for Grub2 [BOOT-5121] --- include/tests_boot_services | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/tests_boot_services b/include/tests_boot_services index d4ea4885..19dc2fb1 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -45,16 +45,21 @@ fi # GRUB2 configuration file - if [ -f /boot/grub/grub.cfg ]; then + if [ -f /boot/grub/grub.cfg -o /boot/grub2/grub.cfg ]; then FOUND=1 BOOT_LOADER="GRUB2" BOOT_LOADER_FOUND=1 GRUB_VERSION=2 - GRUBCONFFILE="/boot/grub/grub.cfg" 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 Add check permission check (600) + fi # Some OSes like Gentoo do not have /boot mounted by default