1
0

fix: apply modprobe workaround to all opensuse releases

This commit is contained in:
dump_stack() 2023-06-20 06:34:11 +00:00
parent b86c0508f9
commit 1cb5c40c77
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -230,7 +230,6 @@ func (suse OpenSUSE) Install(version string, headers bool) (err error) {
cmdf("%s kernel-default-devel=%s", installcmd, version) cmdf("%s kernel-default-devel=%s", installcmd, version)
} }
if !strings.HasPrefix(suse.release, "15") {
cmdf("mkdir /usr/lib/dracut/modules.d/42workaround") cmdf("mkdir /usr/lib/dracut/modules.d/42workaround")
wsetuppath := "/usr/lib/dracut/modules.d/42workaround/module-setup.sh" wsetuppath := "/usr/lib/dracut/modules.d/42workaround/module-setup.sh"
@ -248,14 +247,12 @@ func (suse OpenSUSE) Install(version string, headers bool) (err error) {
cmdf("echo '#!/bin/sh' >> %s", wpath) cmdf("echo '#!/bin/sh' >> %s", wpath)
cmdf("echo 'modprobe af_packet' >> %s", wpath) cmdf("echo 'modprobe af_packet' >> %s", wpath)
cmdf("echo 'modprobe e1000' >> %s", wpath) cmdf("echo 'modprobe e1000' >> %s", wpath)
}
modules := "ata_piix libata e1000 ext4 sd_mod rfkill af_packet" modules := "ata_piix libata e1000 ext4 sd_mod rfkill af_packet"
format := "dracut " format := "dracut "
if !strings.HasPrefix(suse.release, "15") {
format += "-a workaround " format += "-a workaround "
}
if strings.HasPrefix(suse.release, "12") { if strings.HasPrefix(suse.release, "12") {
format += "--no-hostonly --add-drivers '%s' " format += "--no-hostonly --add-drivers '%s' "
} else { } else {