mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00

This commit adds the cloud-initramfs-growroot package to the installation list for GCE images with backports enabled, and updates the gce tasklist to add the /etc/init.d/expand-root script (with provider-appropriate touch-ups) to the image.
16 lines
504 B
Python
16 lines
504 B
Python
from bootstrapvz.base import Task
|
|
from bootstrapvz.common import phases
|
|
from bootstrapvz.common.tasks import initd
|
|
|
|
|
|
class AdjustExpandRootDev(Task):
|
|
description = 'Adjusting the expand-root device'
|
|
phase = phases.system_modification
|
|
predecessors = [initd.AddExpandRoot, initd.AdjustExpandRootScript]
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
import os.path
|
|
from bootstrapvz.common.tools import sed_i
|
|
script = os.path.join(info.root, 'etc/init.d/expand-root')
|
|
sed_i(script, '/dev/xvda', '/dev/sda')
|