mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Make sure we can override grub.ConfigureGrub for Azure images.
This commit is contained in:
parent
b5a0c7df21
commit
7cb4453fe4
1 changed files with 2 additions and 0 deletions
|
@ -23,11 +23,13 @@ class PatchUdev(Task):
|
|||
class ConfigureGrub(Task):
|
||||
description = 'Change grub configuration to allow for ttyS0 output'
|
||||
phase = phases.system_modification
|
||||
predecessors = [grub.ConfigureGrub]
|
||||
successors = [grub.InstallGrub_1_99, grub.InstallGrub_2]
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
from bootstrapvz.common.tools import sed_i
|
||||
grub_config = os.path.join(info.root, 'etc/default/grub')
|
||||
sed_i(grub_config, r'^(GRUB_CMDLINE_LINUX_DEFAULT=.*)', r'GRUB_CMDLINE_LINUX_DEFAULT=""')
|
||||
sed_i(grub_config, r'^(GRUB_CMDLINE_LINUX*=".*)"\s*$', r'\1console=tty0 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 rootdelay=300"')
|
||||
sed_i(grub_config, r'^.*(GRUB_TIMEOUT=).*$', r'GRUB_TIMEOUT=5')
|
||||
|
|
Loading…
Add table
Reference in a new issue