From 563f15db4ddf01e43d1837786e422c0099f8a390 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 9 Feb 2022 15:02:22 +0100 Subject: [PATCH] Adding debug --- archinstall/lib/luks.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index 8d6daefb..24387782 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -107,11 +107,12 @@ class luks2: pw_given = False while cryptworker.is_alive(): - if bytes(f'Enter passphrase for {partition.path}', 'UTF-8') in cryptworker and pw_given is False: - cryptworker.write(password) - with open('debug.txt', 'a') as silent_output: - silent_output.write(f"We did write the output to {cryptworker}") - pw_given = True + with open('debug_outer.txt', 'a') as silent_output: + found = bytes(f'Enter passphrase for {partition.path}', 'UTF-8') in cryptworker + silent_output.write(f"Found string in worker: {found} / {pw_given}") + if found and pw_given is False: + cryptworker.write(password) + pw_given = True if cryptworker.exit_code == 256: log(f'{partition} is being used, trying to unmount and crypt-close the device and running one more attempt at encrypting the device: {cryptworker}', level=logging.INFO)