2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-11-25 09:06:24 +00:00

grub and grub-efi not supported for CentOS

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2023-09-13 13:42:00 +02:00
parent a41bbdb745
commit f8fc729486
Signed by: adphi
GPG Key ID: F2159213400E50AB
3 changed files with 9 additions and 0 deletions

View File

@ -117,6 +117,9 @@ imgs:
defer os.RemoveAll(dir)
for _, img := range testImgs {
if strings.Contains(img.name, "centos") && tt.efi {
t.Skip("efi not supported for CentOS")
}
t.Run(img.name, func(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

View File

@ -58,6 +58,9 @@ type grubProvider struct {
}
func (g grubProvider) New(c Config, r OSRelease) (Bootloader, error) {
if r.ID == ReleaseCentOS {
return nil, fmt.Errorf("grub (efi) is not supported for CentOS, use grub-bios instead")
}
return grub{grubCommon: newGrubCommon(c, r)}, nil
}

View File

@ -55,6 +55,9 @@ type grubEFIProvider struct {
}
func (g grubEFIProvider) New(c Config, r OSRelease) (Bootloader, error) {
if r.ID == ReleaseCentOS {
return nil, fmt.Errorf("grub-efi is not supported for CentOS, use grub-bios instead")
}
return grubEFI{grubCommon: newGrubCommon(c, r)}, nil
}