kayos@tcp.direct 2024-07-18 00:54:08 -07:00
parent e20248db68
commit 92c2ea4772
No known key found for this signature in database
GPG key ID: 4B841471B4BEE979
4 changed files with 79 additions and 15 deletions

View file

@ -201,7 +201,7 @@ func installPassthrough(config *configs.Config) {
// Copy the modules file to /etc/modules
configs.CopyToSystem(config.IsRoot, config.Path.ETCMODULES, "/etc/modules")
if err = command.ExecAndLogSudo(config.IsRoot, true, "update-initramfs -u"); err != nil {
if err = command.ExecAndLogSudo(config.IsRoot, true, "update-initramfs", "-u"); err != nil {
log.Fatalf("Failed to update initramfs: %s", err)
}
@ -212,7 +212,7 @@ func installPassthrough(config *configs.Config) {
// Get systeminfo
sysinfo := uname.New()
if err = command.ExecAndLogSudo(config.IsRoot, true, "dracut -f -v --kver "+sysinfo.Release); err != nil {
if err = command.ExecAndLogSudo(config.IsRoot, true, "dracut", "-f", "-v", "--kver", sysinfo.Release); err != nil {
log.Fatalf("Failed to update initramfs: %s", err)
}
@ -220,7 +220,7 @@ func installPassthrough(config *configs.Config) {
// Copy dracut config to /etc/dracut.conf.d/vfio
configs.CopyToSystem(config.IsRoot, config.Path.MKINITCPIO, "/etc/mkinitcpio.conf")
if err = command.ExecAndLogSudo(config.IsRoot, true, "mkinitcpio -P"); err != nil {
if err = command.ExecAndLogSudo(config.IsRoot, true, "mkinitcpio", "-P"); err != nil {
log.Fatalf("Failed to update initramfs: %s", err)
}
}