[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 23/24] host examination: bootloader: edit all grub2 menu entries



edit all the menuentry and submenu entries.

This is a good idea because in princple the first menu and submenu
entries in the autogenerated grub.cfg might be in a function which is
not actually called.

The resulting grub menu now looks even sillier.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 ts-examine-serial-pre | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/ts-examine-serial-pre b/ts-examine-serial-pre
index 86f332f..90037c6 100755
--- a/ts-examine-serial-pre
+++ b/ts-examine-serial-pre
@@ -80,12 +80,9 @@ sub bootloader () {
     } else {
        # no support for grub1
        $edit->('/boot/grub/grub.cfg', sub {
-            my %done;
             while (<::EI>) {
-               s{^(\s* ( menuentry | submenu ) \s+
-                     (['"]) )( [^'"]+ \3) }{
-                    $done{$2}++ ? $& : "$1$c $4"
-                }xe;
+               s{^(\s* (?: menuentry | submenu ) \s+
+                     (['"]) )( [^'"]+ \2) }{$1$c $3}x;
                print ::EO;
            }
        });
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.