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.
This commit is contained in:
parent
ecc0d1e07f
commit
77fa143bf3
|
|
@ -38,7 +38,10 @@ typedef struct {
|
||||||
char *osname;
|
char *osname;
|
||||||
} OtAdminUpdateKernel;
|
} OtAdminUpdateKernel;
|
||||||
|
|
||||||
|
static gboolean opt_no_bootloader;
|
||||||
|
|
||||||
static GOptionEntry options[] = {
|
static GOptionEntry options[] = {
|
||||||
|
{ "no-bootloader", 0, 0, G_OPTION_ARG_NONE, &opt_no_bootloader, "Don't update bootloader", NULL },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -377,8 +380,11 @@ ot_admin_builtin_update_kernel (int argc, char **argv, OtAdminBuiltinOpts *admin
|
||||||
if (!update_initramfs (self, cancellable, error))
|
if (!update_initramfs (self, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!update_grub (self, cancellable, error))
|
if (!opt_no_bootloader)
|
||||||
goto out;
|
{
|
||||||
|
if (!update_grub (self, cancellable, error))
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue