Commit 5cf10446 authored by Dan Reading's avatar Dan Reading
Browse files

changes so pygrub will parse the new kernel directives in debian grub2

author	Joby Poriyath <>
Tue, 4 Feb 2014 18:10:35 +0000 (18:10 +0000)
menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
instead of linux and initrd.

In addition to this, RHEL 7 menu entries have two different single-quote
delimited strings on the same line, add the greedy grouping for menuentry
parent 71960357
......@@ -356,7 +356,9 @@ class Grub2Image(_GrubImage):
commands = {'set:root': 'root',
'linux': 'kernel',
'linux16': 'kernel',
'initrd': 'initrd',
'initrd16': 'initrd',
'echo': None,
'insmod': None,
'search': None}
......@@ -404,7 +406,7 @@ class Grub2ConfigFile(_GrubConfigFile):
# new image
title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
if title_match:
if img is not None:
raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment