Exit if cryptsetup open fails

This commit is contained in:
Price Hiller 2021-11-25 04:48:27 -06:00
parent 0f8bfe2875
commit 89f1600ca0

View File

@ -262,7 +262,7 @@ install() {
log "info" "Encrypting $(important "${install_disk}"), if you are prompted type $(important "YES")"
cryptsetup -y -v luksFormat "${install_path}" || exit
log "info" "Requesting opening of $(important "${install_disk}")"
cryptsetup open "${install_path}" cryptroot
cryptsetup open "${install_path}" cryptroot || exit
log "info" "Creating file systems..."
mkdfs.fat -F32 "${install_path}"
mkfs.ext4 "/dev/mapper/cryptroot"