From ca992bf864bfa7c6f89e8b5155271b20804e109a Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Mon, 10 Apr 2023 19:35:12 +0200 Subject: [PATCH] Fixes a bug that would add rd.driver=vfio_pci to the kernel args twice --- internal/configs/config_bootloaders.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/configs/config_bootloaders.go b/internal/configs/config_bootloaders.go index 60bbf1d..fa92e74 100644 --- a/internal/configs/config_bootloaders.go +++ b/internal/configs/config_bootloaders.go @@ -57,10 +57,11 @@ func Set_Cmdline(gpu_IDs []string) { // Add the GPU ids for vfio to the kernel arguments fileio.AppendContent(fmt.Sprintf(" vfio_pci.ids=%s", strings.Join(gpu_IDs, ",")), config.Path.CMDLINE) - - // If the config folder for dracut exists in our configs - if fileio.FileExist(config.Path.DRACUT) { - // Add an extra kernel argument needed for dracut users - fileio.AppendContent(" rd.driver.pre=vfio_pci", config.Path.CMDLINE) - } +} + +// TODO: write functions to configure kernelstub and grub +// TODO2: look into grubby +// TODO3: if unknown bootloader, tell user what to add a kernel arguments +func Set_KernelStub() { + }