From 13f570ffce22979ce2b7e2528a28dc4b8bde0dcb Mon Sep 17 00:00:00 2001 From: John Pierce Date: Sun, 15 Jul 2018 12:15:14 -0500 Subject: [PATCH] EC2: Only add grub specific tasks if using grub --- bootstrapvz/providers/ec2/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bootstrapvz/providers/ec2/__init__.py b/bootstrapvz/providers/ec2/__init__.py index 0dd2856..1684142 100644 --- a/bootstrapvz/providers/ec2/__init__.py +++ b/bootstrapvz/providers/ec2/__init__.py @@ -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,