From 43242d93e14b361b3b982035bedcb077ba46b693 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 13 Nov 2019 21:22:21 +0000 Subject: Fixes and close issue #19 --- archinstall.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/archinstall.py b/archinstall.py index 11149ff7..e2257c63 100644 --- a/archinstall.py +++ b/archinstall.py @@ -1,7 +1,7 @@ #!/usr/bin/python3 import traceback import os, re, struct, sys, json, pty, shlex -import urllib.request, urllib.parse, ssl +import urllib.request, urllib.parse, ssl, signal from glob import glob from select import epoll, EPOLLIN, EPOLLHUP from socket import socket, inet_ntoa, AF_INET, AF_INET6, AF_PACKET @@ -74,6 +74,14 @@ except: return data ## FIXME: dependency checks (fdisk, lsblk etc) +def sig_handler(signal, frame): + print('Aborting further installation steps!') + print(' Here\'s a summary of the commandline:') + print(f' {sys.argv}') + + exit(0) +signal.signal(signal.SIGINT, sig_handler) + rootdir_pattern = re.compile('^.*?/devices') harddrives = oDict() @@ -606,10 +614,18 @@ if __name__ == '__main__': # with open(args['pwfile'], 'r') as pw: # PIN = pw.read().strip() + + print() print('[!] Disk PASSWORD is: {}'.format(args['password'])) print() + + for i in range(5, 0, -1): + print(f'Formatting in {i}...') + sleep(1) + + if not args['rerun'] or args['ignore-rerun']: o = simple_command('/usr/bin/umount -R /mnt') o = simple_command('/usr/bin/cryptsetup close /dev/mapper/luksdev') -- cgit v1.2.3-70-g09d2