[ostree] admin: Add --no-bootloader option to update-kernel



commit 77fa143bf3743cf92b041f9f39afffe758236c22
Author: Colin Walters <walters verbum org>
Date:   Tue Jan 8 13:57:24 2013 -0500

    admin: Add --no-bootloader option to update-kernel
    
    Will be used by the QA scripts, since we need to inspect the kernel
    configuration and generate a correct grub conf from that, rather than
    trying to have update-bootloader reuse an existing config, since there
    won't be one initially.

 src/ostree/ot-admin-builtin-update-kernel.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-update-kernel.c b/src/ostree/ot-admin-builtin-update-kernel.c
index 6b398d9..0a46e67 100644
--- a/src/ostree/ot-admin-builtin-update-kernel.c
+++ b/src/ostree/ot-admin-builtin-update-kernel.c
@@ -38,7 +38,10 @@ typedef struct {
   char        *osname;
 } OtAdminUpdateKernel;
 
+static gboolean opt_no_bootloader;
+
 static GOptionEntry options[] = {
+  { "no-bootloader", 0, 0, G_OPTION_ARG_NONE, &opt_no_bootloader, "Don't update bootloader", NULL },
   { NULL }
 };
 
@@ -377,8 +380,11 @@ ot_admin_builtin_update_kernel (int argc, char **argv, OtAdminBuiltinOpts *admin
   if (!update_initramfs (self, cancellable, error))
     goto out;
       
-  if (!update_grub (self, cancellable, error))
-    goto out;
+  if (!opt_no_bootloader)
+    {
+      if (!update_grub (self, cancellable, error))
+        goto out;
+    }
 
   ret = TRUE;
  out:



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