Empirically, the message printed by `echo' is not always shown. It
seems to depend on the host BIOS. I suspect that there's a
VGA-to-serial conversion step which only triggers when grub asks for
keyboard input, or something. In any case, empirically, increasing
the sleep (and sleeping before) did not work on the godellos.
Instead, stuff the cookie into the start of grub menu entries.
This is gross but effective.
We put it in the first menu, and the first submenu, which means it
will appear on the screen somewhere.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
END
} else {
$ed->('/boot/grub/grub.cfg',<<END); # no support for grub1
-\$
-?^terminal_
-a
-echo osstest grub2 $c
-sleep 2
-.
+1
+/^ *menuentry *
+s/'\([^']*\)'/'$c \1'
+1
+/^ *submenu *
+s
END
}
}