diff --git a/archlabs-installer b/archlabs-installer index 2dd888d..089af5f 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -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,25 +2186,25 @@ 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 - local cipher - dlg cipher input "LUKS Encryption" "$_lukskey" "-s 512 -c aes-xts-plain64" - [[ $cipher ]] || return 1 - msg "$_luksadv" "\nCreating encrypted partition: $LUKS_NAME\n\nDevice or volume used: $LUKS_PART\n" 0 - cryptsetup -q $cipher luksFormat "$LUKS_PART" <<< "$LUKS_PASS" 2> "$ERR" - 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_show - return 0 - fi - return 1 + luks_setup || return 1 + local cipher + dlg cipher input "LUKS Encryption" "$_lukskey" "-s 512 -c aes-xts-plain64" + [[ $cipher ]] || return 1 + msg "$_luksadv" "\nCreating encrypted partition: $LUKS_NAME\n\nDevice or volume used: $LUKS_PART\n" 0 + cryptsetup -q $cipher luksFormat "$LUKS_PART" <<< "$LUKS_PASS" 2> "$ERR" + 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 } ###############################################################################