From 441db2aadcac8159b288dc8a6c2a24e170e7671e Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 10 Oct 2020 13:37:07 +0200 Subject: Force the format operation even if partition already exists --- backend/raw_write.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend') diff --git a/backend/raw_write.py b/backend/raw_write.py index 0bdaf81..4428d67 100755 --- a/backend/raw_write.py +++ b/backend/raw_write.py @@ -281,7 +281,7 @@ class Dumper(object): self._progress = 50 if key == "": # example mkfs.ext4 -L mgalive-persist /dev/sdf3 - process = Popen(['mkfs.ext4','-L', label, target+"3"],stderr=PIPE) + process = Popen(['mkfs.ext4', "-q",'-F','-L', label, target+"3"],stderr=PIPE) outs, errs = process.communicate() working=True while working: @@ -307,7 +307,7 @@ class Dumper(object): # example cryptsetup luksFormat /dev/sdb3 print("Crypt key provided",file=sys.stderr) base_target = os.path.basename(target) + "3" - process = Popen(['cryptsetup','luksFormat','-q', target+"3", '-d', '-'],stdin=PIPE, stderr=PIPE) + process = Popen(['cryptsetup','luksFormat','-q', target+"3", '-d', '-'],stdin=PIPE, stderr=PIPE) outs, errs = process.communicate(input=key.encode('utf-8')) working=True while working: @@ -348,7 +348,7 @@ class Dumper(object): return # mkfs.ext4 -L mgalive-persist /dev/mapper/crypt_sdb3 - process = Popen(['mkfs.ext4','-L', label, '/dev/mapper/crypt_' + base_target],stderr=PIPE) + process = Popen(['mkfs.ext4','-q','-F','-L', label, '/dev/mapper/crypt_' + base_target],stderr=PIPE) outs, errs = process.communicate() working=True while working: -- cgit v1.2.1