mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
16 lines
516 B
Python
16 lines
516 B
Python
from base import Task
|
|
from common import phases
|
|
|
|
|
|
class ConfigureGrub(Task):
|
|
description = 'Configuring grub'
|
|
phase = phases.system_modification
|
|
|
|
def run(self, info):
|
|
from common.tools import log_check_call
|
|
log_check_call(['/usr/sbin/chroot', info.root, 'update-initramfs', '-u'])
|
|
log_check_call(['/usr/sbin/grub-install',
|
|
'--boot-directory='+info.root+"/boot/",
|
|
info.bootstrap_device['path']])
|
|
|
|
log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub'])
|