mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Merge pull request #303 from zmarano/master
Again fix the expand-root script for GCE.
This commit is contained in:
commit
d62e20c763
2 changed files with 14 additions and 0 deletions
|
@ -40,6 +40,7 @@ def resolve_tasks(taskset, manifest):
|
|||
tasks.host.InstallHostnameHook,
|
||||
tasks.boot.ConfigureGrub,
|
||||
initd.AddExpandRoot,
|
||||
tasks.initd.AdjustExpandRootDev,
|
||||
initd.InstallInitScripts,
|
||||
boot.BlackListModules,
|
||||
boot.UpdateInitramfs,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from bootstrapvz.base import Task
|
||||
from bootstrapvz.common import phases
|
||||
from bootstrapvz.common.tasks import kernel
|
||||
from bootstrapvz.common.tasks import initd
|
||||
from . import assets
|
||||
import os.path
|
||||
|
||||
|
@ -23,3 +24,15 @@ class AddGrowRootDisable(Task):
|
|||
'etc/initramfs-tools/scripts/local-premount/gce-disable-growroot')
|
||||
copy(script_src, script_dst)
|
||||
os.chmod(script_dst, rwxr_xr_x)
|
||||
|
||||
|
||||
class AdjustExpandRootDev(Task):
|
||||
description = 'Adjusting the expand-root device'
|
||||
phase = phases.system_modification
|
||||
predecessors = [initd.AddExpandRoot, initd.AdjustExpandRootScript]
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
from bootstrapvz.common.tools import sed_i
|
||||
script = os.path.join(info.root, 'etc/init.d/expand-root')
|
||||
sed_i(script, '/dev/loop0', '/dev/sda')
|
||||
|
|
Loading…
Add table
Reference in a new issue