From 97d903f22a7ab1b4abb3eca09dbf7db165cb065b Mon Sep 17 00:00:00 2001
From: Jonathon Hall <jonathon.hall@puri.sm>
Date: Mon, 13 Nov 2023 14:52:09 -0500
Subject: [PATCH] oem-factory-reset: Don't repeat "insert flash drive" message

Don't repeat this message if the user says "no" to the confirmation
prompt.  Go directly to the menu.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
---
 initrd/bin/oem-factory-reset | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/initrd/bin/oem-factory-reset b/initrd/bin/oem-factory-reset
index 4a970c6d..b64d469f 100755
--- a/initrd/bin/oem-factory-reset
+++ b/initrd/bin/oem-factory-reset
@@ -413,10 +413,11 @@ select_thumb_drive_for_key_material() {
     enable_usb
     enable_usb_storage
 
+    prompt_insert_to_be_wiped_thumb_drive
+
     #loop until user chooses a disk
     thumb_drive=""
     while [ -z "$thumb_drive" ]; do
-        prompt_insert_to_be_wiped_thumb_drive
         #list usb storage devices
         list_usb_storage disks >/tmp/usb_disk_list
         # Abort if: