From 64e84fa8542a1b71b23cd9988bc59d11de426bce Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Fri, 11 Mar 2022 23:18:49 +0100 Subject: [PATCH] fix hang in set_GRUB preventing progress --- lib/set_CMDLINE.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/set_CMDLINE.sh b/lib/set_CMDLINE.sh index 3dd1ff9..eeede48 100755 --- a/lib/set_CMDLINE.sh +++ b/lib/set_CMDLINE.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # Function to configure systemd-boot using kernelstub function set_KERNELSTUB () { @@ -40,7 +40,7 @@ function set_GRUB () { local GRUB_CMDLINE_LINUX # Check if there is a GRUB_CMDLINE_LINUX_DEFAULT line in grub config - if grep -q "GRUB_CMDLINE_LINUX_DEFAULT=" ; + if grep -q "GRUB_CMDLINE_LINUX_DEFAULT=" "$SCRIPTDIR/config/etc/default/grub" ; then # Update the GRUB_CMDLINE_LINUX_DEFAULT line GRUB_CMDLINE=$(cat "/etc/default/grub" | grep -P "^GRUB_CMDLINE_LINUX_DEFAULT" | perl -pe "s/GRUB_CMDLINE_LINUX_DEFAULT=\"(.+)\"/\1/" | perl -pe "s/iommu=(pt|on)|amd_iommu=on|vfio_pci.ids=.+|vfio_pci.disable_vga=\d{1}//g" | perl -pe "s/(^\s+|\s+$)//g")