use up to date luks settings
[automated-distro-installer] / fai / config / hooks / partition.DEFAULT
index f98e59556cb8dc338a0c6a3eb6e96344d2c4e68c..afbca5a6d30a825ebf88baabc650e01ec5bb1c26 100755 (executable)
@@ -65,16 +65,17 @@ fi
 # RAID1: forces raid1 filesystem.
 
 mkroot2=false
-case $1 in
-  mkroot2)
-    mkroot2=true
-    ;;
-  *)
-    echo "$0: error: unsupported arg: $1" >&2
-    exit 1
-    ;;
-esac
-
+if [[ $1 ]]; then
+  case $1 in
+    mkroot2)
+      mkroot2=true
+      ;;
+    *)
+      echo "$0: error: unsupported arg: $1" >&2
+      exit 1
+      ;;
+  esac
+fi
 
 
 if [[ $SPECIAL_DISK ]]; then
@@ -185,8 +186,7 @@ luks-setup() {
   # cryptsetup luksAddKey --pbkdf pbkdf2
   # then remove the new format keys with cryptsetup luksRemoveKey
   # then cryptsetup convert DEV --type luks1, then readd old keys and remove temp.
-  yes YES | cryptsetup luksFormat $luksdev $luks_file \
-                       --type luks1 -c aes-cbc-essiv:sha256 -s 256 || [[ $? == 141 ]]
+  yes YES | cryptsetup luksFormat $luksdev $luks_file || [[ $? == 141 ]]
   yes "$lukspw" | \
     cryptsetup luksAddKey --key-file $luks_file \
                $luksdev || [[ $? == 141 ]]