2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2026-06-09 21:45:46 +00:00

fix: remove unused parameters from grub cmdline

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2026-05-07 09:19:15 +02:00
parent 58739c9f1b
commit ece3ff4745
9 changed files with 38 additions and 20 deletions
+5 -3
View File
@@ -38,20 +38,18 @@ GRUB_ENABLE_BLSCFG=false
type grubCommon struct {
name string
c Config
r OSRelease
root string
dev string
}
func newGrubCommon(c Config, r OSRelease) *grubCommon {
func newGrubCommon(r OSRelease) *grubCommon {
name := "grub"
if r.ID == ReleaseCentOS || r.ID == ReleaseAlmaLinux || r.ID == ReleaseRocky {
name = "grub2"
}
return &grubCommon{
name: name,
c: c,
r: r,
}
}
@@ -102,3 +100,7 @@ func (g *grubCommon) mkconfig(ctx context.Context) error {
}
return exec.Run(ctx, "chroot", g.root, g.name+"-mkconfig", "-o", "/boot/"+g.name+"/grub.cfg")
}
func (g *grubCommon) Static() bool {
return false
}