mirror of
https://github.com/linka-cloud/d2vm.git
synced 2024-11-22 07:46:25 +00:00
grub and grub-efi not supported for CentOS
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
a41bbdb745
commit
f8fc729486
@ -117,6 +117,9 @@ imgs:
|
|||||||
|
|
||||||
defer os.RemoveAll(dir)
|
defer os.RemoveAll(dir)
|
||||||
for _, img := range testImgs {
|
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) {
|
t.Run(img.name, func(t *testing.T) {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
3
grub.go
3
grub.go
@ -58,6 +58,9 @@ type grubProvider struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g grubProvider) New(c Config, r OSRelease) (Bootloader, error) {
|
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
|
return grub{grubCommon: newGrubCommon(c, r)}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,9 @@ type grubEFIProvider struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g grubEFIProvider) New(c Config, r OSRelease) (Bootloader, error) {
|
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
|
return grubEFI{grubCommon: newGrubCommon(c, r)}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user