--- trunk/grubby/grubby.c 2014/07/16 10:56:09 2708 +++ trunk/grubby/grubby.c 2014/07/16 10:57:06 2709 @@ -4053,6 +4053,13 @@ } } + struct singleLine *endLine = NULL; + endLine = getLineByType(LT_ENTRY_END, new->lines); + if (endLine) { + removeLine(new, endLine); + needs |= NEED_END; + } + /* add the remainder of the lines, i.e. those that either * weren't present in the template, or in the case of no template, * all the lines following the entryStart. @@ -4111,6 +4118,7 @@ config->secondaryIndent, NULL); needs &= ~NEED_END; } + if (needs) { printf(_("grubby: needs=%d, aborting\n"), needs); abort();