]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
Debian: Abstract away bootloader configuration refresh (update-grub)
authorIan Campbell <ian.campbell@citrix.com>
Thu, 5 Sep 2013 15:10:48 +0000 (16:10 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 6 Sep 2013 09:05:25 +0000 (10:05 +0100)
Osstest/Debian.pm

index 8fbcd57c2b5c18dcb5bb09365c35ac018e4d4dd8..696e764b3f5498b7d5ad4417e33bdb63277c6993 100644 (file)
@@ -76,7 +76,7 @@ sub debian_boot_setup ($$$;$) {
         $bootloader= setupboot_grub2($ho, $xenhopt, $kopt);
     }
 
-    target_cmd_root($ho, "update-grub");
+    $bootloader->{UpdateConfig}($ho);
 
     my $kern= $bootloader->{GetBootKern}();
     logm("dom0 kernel is $kern");
@@ -96,7 +96,7 @@ sub debian_boot_setup ($$$;$) {
 
     $bootloader->{PreFinalUpdate}();
 
-    target_cmd_root($ho, "update-grub");
+    $bootloader->{UpdateConfig}($ho);
 
     store_runvar(target_var_prefix($ho).'xen_kernel_path',$kernpath);
     store_runvar(target_var_prefix($ho).'xen_kernel_ver',$kernver);
@@ -127,6 +127,11 @@ sub setupboot_grub1 ($$$) {
         }
     });
 
+    $bl->{UpdateConfig}= sub {
+       my ( $ho ) = @_;
+       target_cmd_root($ho, "update-grub");
+    };
+
     $bl->{GetBootKern}= sub {
         my $f= bl_getmenu_open($ho, $rmenu, $lmenu);
 
@@ -246,6 +251,12 @@ sub setupboot_grub2 ($$$) {
         return $entry;
     };
 
+
+    $bl->{UpdateConfig}= sub {
+       my ( $ho ) = @_;
+       target_cmd_root($ho, "update-grub");
+    };
+
     $bl->{GetBootKern}= sub { return $parsemenu->()->{$kernkey}; };
 
     $bl->{PreFinalUpdate}= sub {