if m.type == "header":
m.submenu = self.get_menu(m.submenu_level)
- elif m.type == "config":
- c = self.db.get("SELECT * FROM boot WHERE id = %s", m.item)
- if c:
- m._data.update(c)
-
menu.append(m)
return menu
lines.append(ident + "menu end")
elif entry.type == "config":
- lines.append(ident + "label %d" % entry.id)
- lines.append(ident + "\tmenu label %s" % entry.title)
- if entry.description:
+ config = self.netboot.get_config(entry.item)
+
+ lines.append(ident + "label %d" % config.id)
+ lines.append(ident + "\tmenu label %s" % config.title)
+ if config.description:
lines.append(ident + "\ttext help")
- lines.append(word_wrap(entry.description))
+ lines.append(word_wrap(config.description))
lines.append(ident + "\tendtext")
- config = self.netboot.get_config(entry.item)
- if not config: return ""
-
lines.append(ident + "\tkernel %s" % config.image1)
if config.image2:
lines.append(ident + "\tinitrd %s" % config.image2)