bootstrap-vz/plugins/root_password/tasks.py

13 lines
374 B
Python
Raw Normal View History

from base import Task
from common import phases
class SetRootPassword(Task):
description = 'Setting the root password'
phase = phases.system_modification
def run(self, info):
from common.tools import log_check_call
log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/chpasswd'],
2013-08-17 17:28:46 +02:00
'root:' + info.manifest.plugins['root_password']['password'])