Package: startupmanager
Version: 1.9.9-1
Severity: important
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu, ubuntu-patch, hardy, patch
If default entry to boot in menu.lst is bigger than the total number of
entries, startupmanager crashes with "IndexError: list index out of range".
The attached patch fixes the problem exporting 0 as the default entry
when menu.lst is broken.
Link to the bug report in Launchpad:
https://bugs.edge.launchpad.net/ubuntu/+source/startupmanager/+bug/179555
=== modified file 'bootconfig/grub_legacy.py'
--- bootconfig/grub_legacy.py 2008-01-01 11:58:56 +0000
+++ bootconfig/grub_legacy.py 2008-01-01 11:59:06 +0000
@@ -426,7 +426,10 @@
default_boot = self.default_boot
titles = self.titles
if default_boot != -1:
- return titles[default_boot]
+ if default_boot < len(titles):
+ return titles[default_boot]
+ return titles[0]
return -1
def get_titles(self):