diff --git a/docs/release-notes.md b/docs/release-notes.md index ed800e64a..17b83f081 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -28,6 +28,7 @@ Starting with this release, ignition-validate binaries are signed with the - Correctly document Tang `advertisement` field as optional - Fix failure disabling nonexistent unit with systemd ≥ 252 - Don't relabel a mount point that already exists +- qemu: Use distro-specific `modprobe` path when loading kernel modules ### Test changes diff --git a/internal/providers/qemu/qemu_blockdev.go b/internal/providers/qemu/qemu_blockdev.go index 1e54424b6..778a151df 100644 --- a/internal/providers/qemu/qemu_blockdev.go +++ b/internal/providers/qemu/qemu_blockdev.go @@ -28,6 +28,7 @@ import ( "time" "github.com/coreos/ignition/v2/config/v3_5_experimental/types" + "github.com/coreos/ignition/v2/internal/distro" "github.com/coreos/ignition/v2/internal/log" "github.com/coreos/ignition/v2/internal/platform" "github.com/coreos/ignition/v2/internal/providers/util" @@ -52,7 +53,7 @@ func init() { func fetchConfig(f *resource.Fetcher) (types.Config, report.Report, error) { f.Logger.Warning("Fetching the Ignition config via the Virtio block driver is currently experimental and subject to change.") - _, err := f.Logger.LogCmd(exec.Command("modprobe", "virtio_blk"), "loading Virtio block driver module") + _, err := f.Logger.LogCmd(exec.Command(distro.ModprobeCmd(), "virtio_blk"), "loading Virtio block driver module") if err != nil { return types.Config{}, report.Report{}, err } diff --git a/internal/providers/qemu/qemu_fwcfg.go b/internal/providers/qemu/qemu_fwcfg.go index 517003d0e..9451981b6 100644 --- a/internal/providers/qemu/qemu_fwcfg.go +++ b/internal/providers/qemu/qemu_fwcfg.go @@ -30,6 +30,7 @@ import ( "time" "github.com/coreos/ignition/v2/config/v3_5_experimental/types" + "github.com/coreos/ignition/v2/internal/distro" "github.com/coreos/ignition/v2/internal/platform" "github.com/coreos/ignition/v2/internal/providers/util" "github.com/coreos/ignition/v2/internal/resource" @@ -51,7 +52,7 @@ func init() { func fetchConfig(f *resource.Fetcher) (types.Config, report.Report, error) { // load qemu_fw_cfg module - _, err := f.Logger.LogCmd(exec.Command("modprobe", "qemu_fw_cfg"), "loading QEMU firmware config module") + _, err := f.Logger.LogCmd(exec.Command(distro.ModprobeCmd(), "qemu_fw_cfg"), "loading QEMU firmware config module") if err != nil { return types.Config{}, report.Report{}, err }