EC2: Only add grub specific tasks if using grub

This commit is contained in:
John Pierce 2018-07-15 12:15:14 -05:00
parent a4f2e1cfdb
commit 13f570ffce
No known key found for this signature in database
GPG key ID: 288FF21B5FF38DC6

View file

@ -65,14 +65,10 @@ def resolve_tasks(taskset, manifest):
connection.GetCredentials,
ami.AMIName,
connection.Connect,
tuning.TuneSystem,
tuning.BlackListModules,
bootstrapvz.common.tasks.boot.BlackListModules,
bootstrapvz.common.tasks.boot.DisableGetTTYs,
boot.AddXenGrubConsoleOutputDevice,
bootstrapvz.common.tasks.grub.WriteGrubConfig,
boot.UpdateGrubConfig,
bootstrapvz.common.tasks.initd.AddExpandRoot,
bootstrapvz.common.tasks.initd.RemoveHWClock,
bootstrapvz.common.tasks.initd.InstallInitScripts,
@ -101,6 +97,11 @@ def resolve_tasks(taskset, manifest):
if manifest.volume['partitions']['type'] != 'none':
taskset.add(bootstrapvz.common.tasks.initd.AdjustExpandRootScript)
if manifest.system['bootloader'] in ('grub', 'pvgrub'):
taskset.update([boot.AddXenGrubConsoleOutputDevice,
bootstrapvz.common.tasks.grub.WriteGrubConfig,
boot.UpdateGrubConfig])
if manifest.system['bootloader'] == 'pvgrub':
taskset.add(bootstrapvz.common.tasks.grub.AddGrubPackage)
taskset.update([bootstrapvz.common.tasks.grub.AddGrubPackage,