bootstrap-vz/plugins/sed/tasks.py

16 lines
441 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):
2013-11-21 15:52:26 +01:00
description = 'Sedding files'
phase = phases.system_modification
2013-10-07 13:22:08 +00:00
after = [AptUpgrade]
2013-11-21 15:52:26 +01:00
def run(self, info):
chroot_path = os.path.join(info.root, info.manifest.plugins['sed']['file'])
sed_i(chroot_path, info.manifest.plugins['sed']['find'], info.manifest.plugins['sed']['replace'])