fix: correct vfio_pci to vfio-pci in rd.driver.pre for dracut

This commit is contained in:
HikariKnight 2024-12-29 05:34:03 +01:00
parent 4f51fd5c5f
commit 276cfd953a

View file

@ -31,9 +31,9 @@ func Set_Dracut() {
kernel_args := fileio.ReadFile(config.Path.CMDLINE)
// If the kernel argument is not already in the file
if !strings.Contains(kernel_args, "rd.driver.pre=vfio_pci") {
if !strings.Contains(kernel_args, "rd.driver.pre=vfio-pci") {
// Add to our kernel arguments file that vfio_pci should load early (dracut does this using kernel arguments)
fileio.AppendContent(" rd.driver.pre=vfio_pci", config.Path.CMDLINE)
fileio.AppendContent(" rd.driver.pre=vfio-pci", config.Path.CMDLINE)
}
// Make a backup of dracutConf if there is one there