From 073d21162c9ac295b21f5aab8fec657fe30d1f58 Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Tue, 19 Sep 2023 10:52:44 +0200 Subject: [PATCH] Add VIDEOMODE option to boot a basic mode. --- lib/pikvm.pm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/pikvm.pm b/lib/pikvm.pm index 6a7221bf..56b24b04 100644 --- a/lib/pikvm.pm +++ b/lib/pikvm.pm @@ -198,10 +198,23 @@ sub boot_iso { # The Grub menu should appear with "Test this media" as a default # selection. However, we do not want to go with that because the # check slows down the process. Therefore, we will move one step - # up and select to boot the installer without any testing. - send_key("up"); - sleep(1); - send_key("ret"); + # up and select to boot the installer without any testing + # However, if we are to use the BASIC graphics boot, we need + # to pass a different scenario. + if (get_var('VIDEOMODE') eq 'basic') { + send_key("down"); + sleep(1); + send_key("ret"); + sleep(1); + send_key("up"); + sleep(1); + send_key("ret"); + } + else { + send_key("up"); + sleep(1); + send_key("ret"); + } } # This routine is similar to boot_iso but it uses different needles