]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
host examination: serial, grub2: put cookie in menu lines
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 17 May 2017 15:30:03 +0000 (16:30 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 18 May 2017 11:01:17 +0000 (12:01 +0100)
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>
ts-examine-serial-pre

index 01134ad97ff75bdc15b217d17a07d00fc2e3f528..26fbc56598b276dbd6a9a39929c02e025de208c7 100755 (executable)
@@ -83,12 +83,12 @@ echo osstest uboot $c
 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
     }
 }