Added further exit conditions

This commit is contained in:
Price Hiller 2021-11-25 04:47:59 -06:00
parent 2ac4d7c95f
commit 0f8bfe2875

View File

@ -243,9 +243,9 @@ install() {
sfdisk --delete "${install_path}" >/dev/null
log "info" "Wiped partitions on $(important "${install_disk}")"
log "info" "Securely erasing remaining data on $(important "${install_disk}")"
# echo YES | cryptsetup open --type plain -d /dev/urandom "${install_path}" to_be_wiped > /dev/null
# dd bs=1M if=/dev/zero of=/dev/mapper/to_be_wiped status=progress 2> /dev/null
# cryptsetup close to_be_wiped
# echo YES | cryptsetup open --type plain -d /dev/urandom "${install_path}" to_be_wiped > /dev/null || exit
# dd bs=1M if=/dev/zero of=/dev/mapper/to_be_wiped status=progress 2> /dev/null || exit
# cryptsetup close to_be_wiped || exit
log "info" "Writing new partitions to $(important "${install_disk}")"
(echo n
echo
@ -270,7 +270,7 @@ install() {
mount /dev/mapper/cryptroot /mnt
mkdir /mnt/boot
mount "${install_path}" /mnt/boot/
mount "${install_path}" /mnt/boot
local mem_amount
mem_amount="$(grep MemTotal /proc/meminfo | tr -s " " | cut -d " " -f2)"
mem_amount=$(( mem_amount * 3/2 / 1000 ))