bootstrap-vz/plugins/image_commands/tasks.py
Anders Ingemann 60a6fa0df2 Fix #132
2014-01-14 08:51:54 +01:00

14 lines
438 B
Python

from base import Task
from common import phases
class ImageExecuteCommand(Task):
description = 'Execute command in the image'
phase = phases.system_modification
@classmethod
def run(cls, info):
from common.tools import log_check_call
for raw_command in info.manifest.plugins['image_commands']['commands']:
command = map(lambda part: part.format(root=info.root, **info.manifest_vars), raw_command)
log_check_call(command)