bootstrap-vz/plugins/image_commands/image_commands.py
Olivier Sallou 99b7834611 fix call of ImageCommands, object should not be called, only class should be
remove loopback_file reference, not existing anymore
  filesystem not available anymore, and depends on volume layout so remove the
  execute commands after the user_packages install, else user won't be able to
  call or update installed packages
2013-12-15 08:33:45 +01:00

19 lines
706 B
Python

from base import Task
from common import phases
from plugins.user_packages.user_packages import AddUserPackages, \
AddLocalUserPackages
class ImageExecuteCommand(Task):
description = 'Execute command in the image'
phase = phases.system_modification
predecessors = [AddUserPackages, AddLocalUserPackages]
def run(self, info):
from common.tools import log_check_call
for user_cmd in info.manifest.plugins['image_commands']['commands']:
command = []
for elt in user_cmd:
fragment = elt.format(root=info.root)
command.append(fragment)
log_check_call(command)