virt-customize already enables appliance networking by default; conversely, if the user passes "--no-network", we shouldn't override that for the sake of "--key ID:clevis". Add comments about clevis to the code. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1809453 Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- customize/customize_main.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/customize/customize_main.ml b/customize/customize_main.ml index 8a022342f107..32b7eebdde42 100644 --- a/customize/customize_main.ml +++ b/customize/customize_main.ml @@ -50,11 +50,15 @@ let main () = format_consumed := false in let libvirturi = ref "" in let memsize = ref None in let set_memsize arg = memsize := Some arg in + + (* Note that [--key ID:clevis] depends on this default. See more below, near + * [g#set_network network]. *) let network = ref true in + let smp = ref None in let set_smp arg = smp := Some arg in let add_file arg = let uri = @@ -157,10 +161,13 @@ read the man page virt-customize(1). (* Connect to libguestfs. *) let g = let g = open_guestfs () in Option.may g#set_memsize memsize; Option.may g#set_smp smp; + (* [--no-network] from the command line takes precedence over the automatic + * network enablement for [--key ID:clevis], so here we intentionally don't check + * [key_store_requires_network opthandle.ks]. *) g#set_network network; (* Add disks. *) add g dryrun; -- 2.19.1.3.g30247aa5d201