Added debug
This commit is contained in:
parent
ac8393645c
commit
27059f4f80
|
|
@ -587,7 +587,9 @@ def close_disks():
|
||||||
o = simple_command('/usr/bin/umount -R /mnt')
|
o = simple_command('/usr/bin/umount -R /mnt')
|
||||||
o = simple_command('/usr/bin/cryptsetup close /dev/mapper/luksdev')
|
o = simple_command('/usr/bin/cryptsetup close /dev/mapper/luksdev')
|
||||||
|
|
||||||
def format_disk(drive, start='512MiB', end='100%', emulate=False):
|
def format_disk(drive=None, start='512MiB', end='100%', emulate=False):
|
||||||
|
if not drive:
|
||||||
|
raise ValueError('Need to supply a drive path, for instance: /dev/sdx')
|
||||||
print(f'[N] Setting up {drive}.')
|
print(f'[N] Setting up {drive}.')
|
||||||
# dd if=/dev/random of=args['drive'] bs=4096 status=progress
|
# dd if=/dev/random of=args['drive'] bs=4096 status=progress
|
||||||
# https://github.com/dcantrell/pyparted would be nice, but isn't officially in the repo's #SadPanda
|
# https://github.com/dcantrell/pyparted would be nice, but isn't officially in the repo's #SadPanda
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue