aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatMoul <matmoul@gmail.com>2015-08-22 19:48:34 +0200
committerMatMoul <matmoul@gmail.com>2015-08-22 19:48:34 +0200
commitc3e23c76cec98aaae8fae47971482bfe331978d8 (patch)
tree6be410a0dacf4e5bb2e51656d97e66725da0d098
parentd27f342989dd050d1bff28c5a793f12095b9d5f8 (diff)
downloadhyperfi-c3e23c76cec98aaae8fae47971482bfe331978d8.tar.lz
hyperfi-c3e23c76cec98aaae8fae47971482bfe331978d8.tar.xz
hyperfi-c3e23c76cec98aaae8fae47971482bfe331978d8.zip
Add luks support
-rw-r--r--archfi10
1 files changed, 10 insertions, 0 deletions
diff --git a/archfi b/archfi
index ed1746b..78f514f 100644
--- a/archfi
+++ b/archfi
@@ -525,6 +525,9 @@ formatdevice(){
options+=("ext2" "")
options+=("xfs" "")
options+=("jfs" "")
+ if [ ! "$3" = "noluks" ]; then
+ options+=("luks" "encrypted")
+ fi
sel=$(whiptail --backtitle "$apptitle" --title "$txtformatdevice" --menu "${txtselectpartformat//%1/$1 ($2)}" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
@@ -542,6 +545,13 @@ formatdevice(){
ext2) mkfs.ext2 $2;;
xfs) mkfs.xfs -f $2;;
jfs) mkfs.jfs -f $2;;
+ luks)
+ cryptsetup luksFormat $2
+ cryptsetup luksOpen $2 $1
+ formatdevice $1 /dev/mapper/$1 noluks
+ rootdev=/dev/mapper/$1
+ #luksdrive=1
+ ;;
esac
echo ""
pressanykey