From 9d2ad17d09e3672655fa9472d0ff25f8a9d7db2c Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sat, 4 Jun 2016 19:20:31 +0200 Subject: [PATCH] ec2: Enable systemd on >=jessie --- bootstrapvz/common/tasks/grub.py | 10 ++++++++++ bootstrapvz/providers/ec2/__init__.py | 1 + 2 files changed, 11 insertions(+) diff --git a/bootstrapvz/common/tasks/grub.py b/bootstrapvz/common/tasks/grub.py index 7cff507..cd261a3 100644 --- a/bootstrapvz/common/tasks/grub.py +++ b/bootstrapvz/common/tasks/grub.py @@ -280,6 +280,16 @@ class DisableGrubRecovery(Task): info.grub_config['GRUB_DISABLE_RECOVERY'] = True +class EnableSystemd(Task): + description = 'Enabling systemd' + phase = phases.system_modification + successors = [WriteGrubConfig] + + @classmethod + def run(cls, info): + info.grub_config['GRUB_CMDLINE_LINUX'].append('init=/bin/systemd') + + class InstallGrub_1_99(Task): description = 'Installing grub 1.99' phase = phases.system_modification diff --git a/bootstrapvz/providers/ec2/__init__.py b/bootstrapvz/providers/ec2/__init__.py index f003d5f..56ebca3 100644 --- a/bootstrapvz/providers/ec2/__init__.py +++ b/bootstrapvz/providers/ec2/__init__.py @@ -84,6 +84,7 @@ def resolve_tasks(taskset, manifest): if manifest.release >= jessie: taskset.add(tasks.packages.AddWorkaroundGrowpart) taskset.add(initd.AdjustGrowpartWorkaround) + taskset.add(tasks.grub.EnableSystemd) if manifest.provider.get('install_init_scripts', True): taskset.add(tasks.initd.AddEC2InitScripts)