Clean up a few things
This commit is contained in:
parent
904cd16a5b
commit
6b8d0b7e1d
@ -5,15 +5,12 @@
|
||||
# Some ideas and code reworked from other resources
|
||||
# AIF, Calamares, and the Arch Wiki.. Credit where credit is due
|
||||
|
||||
# check for syntax errors
|
||||
# set -n
|
||||
|
||||
VER=2.1.16
|
||||
VER=2.1.17
|
||||
|
||||
# default values {
|
||||
|
||||
: ${DIST=ArchLabs} # distro name if not set
|
||||
MNT=/mnt # installation root mountpoint
|
||||
: ${MNT=/mnt} # installation root mountpoint if not set
|
||||
ANS=/tmp/ans # dialog answer output file
|
||||
FONT=ter-i16n # font used for the linux console
|
||||
HOOKS=shutdown # additional mkinitcpio HOOKS
|
||||
@ -2135,7 +2132,8 @@ luks_pass()
|
||||
|
||||
until [[ $LUKS_PASS ]]; do
|
||||
tput cnorm
|
||||
dialog --insecure --backtitle "$DIST Installer - $SYS - v$VER" --separator $'\n' --title " $t " --mixedform "$_luksomenu" 0 0 0 \
|
||||
dialog --insecure --backtitle "$DIST Installer - $SYS - v$VER" \
|
||||
--separator $'\n' --title " $t " --mixedform "$_luksomenu" 0 0 0 \
|
||||
"Name:" 1 1 "${ans[0]}" 1 7 "$COLUMNS" 0 0 \
|
||||
"Password:" 2 1 '' 2 11 "$COLUMNS" 0 1 \
|
||||
"Password2:" 3 1 '' 3 12 "$COLUMNS" 0 1 2> "$ANS" || return 1
|
||||
@ -2188,13 +2186,14 @@ luks_basic()
|
||||
errshow 0 "cryptsetup -q luksFormat '$LUKS_PART' <<< '$LUKS_PASS'" || return 1
|
||||
cryptsetup open "$LUKS_PART" "$LUKS_NAME" <<< "$LUKS_PASS" 2> "$ERR"
|
||||
errshow 0 "cryptsetup open '$LUKS_PART' '$LUKS_NAME' <<< '$LUKS_PASS'" || return 1
|
||||
LUKS='encrypted'; luks_show
|
||||
LUKS='encrypted'
|
||||
luks_show
|
||||
return 0
|
||||
}
|
||||
|
||||
luks_advanced()
|
||||
{
|
||||
if luks_setup; then
|
||||
luks_setup || return 1
|
||||
local cipher
|
||||
dlg cipher input "LUKS Encryption" "$_lukskey" "-s 512 -c aes-xts-plain64"
|
||||
[[ $cipher ]] || return 1
|
||||
@ -2203,10 +2202,9 @@ luks_advanced()
|
||||
errshow 0 "cryptsetup -q $cipher luksFormat '$LUKS_PART' <<< '$LUKS_PASS'" || return 1
|
||||
cryptsetup open "$LUKS_PART" "$LUKS_NAME" <<< "$LUKS_PASS" 2> "$ERR"
|
||||
errshow 0 "cryptsetup open '$LUKS_PART' '$LUKS_NAME' <<< '$LUKS_PASS'" || return 1
|
||||
LUKS='encrypted'
|
||||
luks_show
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
Reference in New Issue
Block a user