Added debug information
This commit is contained in:
parent
3e2c816b51
commit
80130b4898
|
|
@ -335,7 +335,7 @@ class SysCommandWorker:
|
||||||
self.ended = time.time()
|
self.ended = time.time()
|
||||||
break
|
break
|
||||||
|
|
||||||
if self.ended or (got_output is False and pid_exists(self.pid) is False):
|
if pid_exists(self.pid) is False:
|
||||||
self.ended = time.time()
|
self.ended = time.time()
|
||||||
try:
|
try:
|
||||||
self.exit_code = os.waitpid(self.pid, 0)[1]
|
self.exit_code = os.waitpid(self.pid, 0)[1]
|
||||||
|
|
|
||||||
|
|
@ -181,12 +181,13 @@ class luks2:
|
||||||
os.path.basename(mountpoint) # TODO: Raise exception instead?
|
os.path.basename(mountpoint) # TODO: Raise exception instead?
|
||||||
|
|
||||||
# print(f"Looking for phrase: 'Enter passphrase for {partition.path}'")
|
# print(f"Looking for phrase: 'Enter passphrase for {partition.path}'")
|
||||||
cryptworker = SysCommandWorker(f'/usr/bin/cryptsetup open {partition.path} {mountpoint} --type luks2')
|
cryptworker = SysCommandWorker(f'/usr/bin/cryptsetup open {partition.path} {mountpoint} --type luks2', peak_output=True)
|
||||||
|
|
||||||
# print(f'Looking for: Enter passphrase for {partition.path}')
|
# print(f'Looking for: Enter passphrase for {partition.path}')
|
||||||
pw_given = False
|
pw_given = False
|
||||||
while cryptworker.is_alive():
|
while cryptworker.is_alive():
|
||||||
if bytes(f'Enter passphrase for {partition.path}', 'UTF-8') in cryptworker and pw_given is False:
|
if bytes(f'Enter passphrase for {partition.path}', 'UTF-8') in cryptworker and pw_given is False:
|
||||||
|
print('Entered the passphrase..')
|
||||||
cryptworker.write(password)
|
cryptworker.write(password)
|
||||||
pw_given = True
|
pw_given = True
|
||||||
time.sleep(0.25)
|
time.sleep(0.25)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue