From ba1fd9330846bc0b13d92b9dcb59e0e91a513b91 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sun, 7 Jul 2013 17:33:19 +0200 Subject: [PATCH] Pulled disabling of daemonautostart into separate task --- providers/ec2/__init__.py | 1 + providers/ec2/tasks/apt.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/providers/ec2/__init__.py b/providers/ec2/__init__.py index 9d1f598..b824363 100644 --- a/providers/ec2/__init__.py +++ b/providers/ec2/__init__.py @@ -42,6 +42,7 @@ def tasks(tasklist, manifest): filesystem.MountSpecials(), locale.GenerateLocale(), locale.SetTimezone(), + apt.DisableDaemonAutostart(), apt.AptSources(), apt.AptUpgrade(), boot.ConfigureGrub(), diff --git a/providers/ec2/tasks/apt.py b/providers/ec2/tasks/apt.py index 3da13c5..209847e 100644 --- a/providers/ec2/tasks/apt.py +++ b/providers/ec2/tasks/apt.py @@ -22,10 +22,9 @@ class AptSources(Task): release=info.manifest.system['release']))) -class AptUpgrade(Task): - description = 'Upgrading packages and fixing broken dependencies' +class DisableDaemonAutostart(Task): + description = 'Disabling daemon autostart' phase = phases.system_modification - after = [GenerateLocale, AptSources] def run(self, info): rc_policy_path = os.path.join(info.root, 'usr/sbin/policy-rc.d') @@ -37,6 +36,14 @@ class AptUpgrade(Task): stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH) + + +class AptUpgrade(Task): + description = 'Upgrading packages and fixing broken dependencies' + phase = phases.system_modification + after = [GenerateLocale, AptSources, DisableDaemonAutostart] + + def run(self, info): log_check_call(['chroot', info.root, 'apt-get', 'update']) log_check_call(['chroot', info.root, 'apt-get', '-f', '-y', 'install']) log_check_call(['chroot', info.root, 'apt-get', '-y', 'upgrade'])