From b87edc6fbc511e2b4959d598b8160c84601835a4 Mon Sep 17 00:00:00 2001
From: MatMoul <matmoul@gmail.com>
Date: Sun, 1 Nov 2015 18:53:01 +0100
Subject: [PATCH] Correct bug on LUKS bad confirmation

---
 archfi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/archfi b/archfi
index 4a0676f..581b6ae 100644
--- a/archfi
+++ b/archfi
@@ -571,10 +571,18 @@ formatdevice(){
       echo "$txtcreateluksdevice"
       echo "cryptsetup luksFormat $2"
       cryptsetup luksFormat $2
+      if [ ! "$?" = "0"];then
+        pressanykey
+        return 0
+      fi
       echo ""
       echo "$txtopenluksdevice"
       echo "cryptsetup luksOpen $2 $1"
       cryptsetup luksOpen $2 $1
+      if [ ! "$?" = "0"];then
+        pressanykey
+        return 0
+      fi
       options=()
       options+=("normal" "")
       options+=("fast" "")