bootstrap-vz/plugins/sed/tasks.py

20 lines
626 B
Python
Raw Normal View History

2013-10-07 13:22:08 +00:00
from base import Task
from common import phases
from common.tasks.apt import AptUpgrade
from common.tools import sed_i
import os
class DoSeds(Task):
description = 'Sedding files'
phase = phases.system_modification
after = [AptUpgrade]
def run(self, info):
chroot_path = os.path.join(info.root, info.manifest.plugins['sed']['file'])
print chroot_path
print info.manifest.plugins['sed']['file']
print info.manifest.plugins['sed']['find']
print info.manifest.plugins['sed']['replace']
sed_i(chroot_path, info.manifest.plugins['sed']['find'], info.manifest.plugins['sed']['replace'])