Order, timeout

This commit is contained in:
Ian Gulliver
2016-03-31 11:12:02 -07:00
parent 5e30443b61
commit 4aa2bb0753

View File

@@ -30,9 +30,17 @@ class GrubUpdater(object):
self._image_path = '/' + os.path.relpath(self._image_dir, self._boot_dir) self._image_path = '/' + os.path.relpath(self._image_dir, self._boot_dir)
def Update(self): def Update(self):
sys.stdout.write("""
set timeout=5
""")
files = []
for filename in os.listdir(self._image_dir): for filename in os.listdir(self._image_dir):
if not filename.endswith('.iso'): if not filename.endswith('.iso'):
continue continue
files.append(filename)
for filename in files.sorted(reverse=True):
sys.stdout.write(""" sys.stdout.write("""
menuentry "%(image_filename)s" { menuentry "%(image_filename)s" {
search --no-floppy --file --set=root %(image_path)s/%(image_filename)s search --no-floppy --file --set=root %(image_path)s/%(image_filename)s