From b4a45b422809a4781438f748b369cbc70a3ce240 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Sat, 12 Mar 2022 18:37:06 +0100 Subject: [PATCH] get current modules and modules from our config folder --- lib/set_MKINITCPIO.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/set_MKINITCPIO.sh b/lib/set_MKINITCPIO.sh index f4c1f82..945aa2c 100755 --- a/lib/set_MKINITCPIO.sh +++ b/lib/set_MKINITCPIO.sh @@ -4,8 +4,8 @@ function set_MKINITCPIO () { source "$SCRIPTDIR/lib/paths.sh" # Grab the current modules but exclude vfio and vendor-reset - CURRENTMODULES=$(grep -P "^MODULES" /etc/mkinitcpio.conf | perl -pe "s/MODULES=\((.+)\)/\1/") - MODULES="$(grep -P "^MODULES" /etc/mkinitcpio.conf | perl -pe "s/MODULES=\((.+)\)/\1/" | perl -pe "s/\s?(vfio_iommu_type1|vfio_pci|vfio_virqfd|vfio|vendor-reset)\s?//g")" + CURRENTMODULES=$(grep -P "^MODULES" "$SCRIPTDIR/$MKINITCPIO" | perl -pe "s/MODULES=\((.+)\)/\1/") + MODULES="$(grep -P "^MODULES" "$SCRIPTDIR/$MKINITCPIO" | perl -pe "s/MODULES=\((.+)\)/\1/" | perl -pe "s/\s?(vfio_iommu_type1|vfio_pci|vfio_virqfd|vfio|vendor-reset)\s?//g")" if [[ $CURRENTMODULES =~ "vendor-reset" ]]; then