mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00

In practice they are just typed functions with attributes, having a reference to an object is just confusing. So: Task.run() is now a classmethod
13 lines
387 B
Python
13 lines
387 B
Python
from base import Task
|
|
from common import phases
|
|
|
|
|
|
class SetRootPassword(Task):
|
|
description = 'Setting the root password'
|
|
phase = phases.system_modification
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
from common.tools import log_check_call
|
|
log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/chpasswd'],
|
|
'root:' + info.manifest.plugins['root_password']['password'])
|