From 4954917ab298feb4e4a15fdec2486863ade75639 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Sat, 12 Mar 2022 03:53:49 +0100 Subject: [PATCH] support generating grub.cfg on systems where it is located in /boot/grub2/ --- lib/set_CMDLINE.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/set_CMDLINE.sh b/lib/set_CMDLINE.sh index 3ac5a9f..3497532 100755 --- a/lib/set_CMDLINE.sh +++ b/lib/set_CMDLINE.sh @@ -70,7 +70,14 @@ $SCRIPTDIR/backup/etc/default/grub read -r -p "Press ENTER to continue" sudo cp -v "$SCRIPTDIR/config/etc/default/grub" "/etc/default/grub" - sudo grub-mkconfig -o "/boot/grub/grub.cfg" + + # Generate grub.cfg + if [ -d "/boot/grub" ]; + then + sudo grub-mkconfig -o "/boot/grub/grub.cfg" + else + sudo grub-mkconfig -o "/boot/grub2/grub.cfg" + fi echo "" read -r -p "Please verify there was no errors generating the grub.cfg file, then press ENTER"