deploy: With --no-kernel, do copy host kernel modules
This is used by the qemu scripts, and there we *do* need the kernel modules inside the target system.
This commit is contained in:
parent
05e7b6d596
commit
f2b1be6a1e
|
|
@ -548,6 +548,8 @@ do_update_kernel (OtAdminDeploy *self,
|
||||||
"--ostree-dir", ot_gfile_get_path_cached (self->ostree_dir),
|
"--ostree-dir", ot_gfile_get_path_cached (self->ostree_dir),
|
||||||
"update-kernel",
|
"update-kernel",
|
||||||
ot_gfile_get_path_cached (deploy_path), NULL);
|
ot_gfile_get_path_cached (deploy_path), NULL);
|
||||||
|
if (opt_no_kernel)
|
||||||
|
g_ptr_array_add (args, "--modules-only");
|
||||||
g_ptr_array_add (args, NULL);
|
g_ptr_array_add (args, NULL);
|
||||||
|
|
||||||
if (!ot_spawn_sync_checked (ot_gfile_get_path_cached (self->ostree_dir),
|
if (!ot_spawn_sync_checked (ot_gfile_get_path_cached (self->ostree_dir),
|
||||||
|
|
@ -606,11 +608,8 @@ ot_admin_builtin_deploy (int argc, char **argv, GFile *ostree_dir, GError **erro
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!opt_no_kernel)
|
if (!do_update_kernel (self, deploy_path, cancellable, error))
|
||||||
{
|
goto out;
|
||||||
if (!do_update_kernel (self, deploy_path, cancellable, error))
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,10 @@ typedef struct {
|
||||||
GFile *ostree_dir;
|
GFile *ostree_dir;
|
||||||
} OtAdminUpdateKernel;
|
} OtAdminUpdateKernel;
|
||||||
|
|
||||||
|
static gboolean opt_modules_only;
|
||||||
|
|
||||||
static GOptionEntry options[] = {
|
static GOptionEntry options[] = {
|
||||||
|
{ "modules-only", 0, 0, G_OPTION_ARG_NONE, &opt_modules_only, "Only copy kernel modules", NULL },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -323,11 +326,14 @@ ot_admin_builtin_update_kernel (int argc, char **argv, GFile *ostree_dir, GError
|
||||||
if (!copy_modules (self, release, cancellable, error))
|
if (!copy_modules (self, release, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!update_initramfs (self, release, deploy_path, cancellable, error))
|
if (!opt_modules_only)
|
||||||
goto out;
|
{
|
||||||
|
if (!update_initramfs (self, release, deploy_path, cancellable, error))
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (!update_grub (self, release, cancellable, error))
|
if (!update_grub (self, release, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue