Call the OCaml-language helper "key_store_requires_network" in those OCaml
utilities that pass "~key_opts:true" to "create_standard_options", and
do
not have any code related to networking yet.
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1809453
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
get-kernel/get_kernel.ml | 1 +
sparsify/copying.ml | 1 +
sparsify/in_place.ml | 1 +
3 files changed, 3 insertions(+)
diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml
index e485cf4952da..9c2aa17c225b 100644
--- a/get-kernel/get_kernel.ml
+++ b/get-kernel/get_kernel.ml
@@ -174,10 +174,11 @@ let main () =
let add, output, unversioned, prefix, ks = parse_cmdline () in
(* Connect to libguestfs. *)
let g = open_guestfs () in
add g;
+ g#set_network (key_store_requires_network ks);
g#launch ();
(* Decrypt the disks. *)
inspect_decrypt g ks;
diff --git a/sparsify/copying.ml b/sparsify/copying.ml
index 39d06c94c0ac..21a603d63548 100644
--- a/sparsify/copying.ml
+++ b/sparsify/copying.ml
@@ -185,10 +185,11 @@ You can ignore this warning or change it to a hard failure using
the
if not (quiet ()) then (
let machine_readable = machine_readable () <> None in
Progress.set_up_progress_bar ~machine_readable g
);
+ g#set_network (key_store_requires_network ks);
g#launch ();
g in
(* Decrypt the disks. *)
diff --git a/sparsify/in_place.ml b/sparsify/in_place.ml
index 00f0e056478c..0eec63e6f049 100644
--- a/sparsify/in_place.ml
+++ b/sparsify/in_place.ml
@@ -56,10 +56,11 @@ let run disk format ignores zeroes ks =
if not (quiet ()) then (
let machine_readable = machine_readable () <> None in
Progress.set_up_progress_bar ~machine_readable g
);
+ g#set_network (key_store_requires_network ks);
g#launch ();
(* If discard is not supported in the appliance, we must return exit
* code 3. See the man page.
*)
--
2.19.1.3.g30247aa5d201