diff --git a/debian/chroot.install b/debian/chroot.install index 2f08cb2..867699d 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -71,15 +71,15 @@ if [ "${manage_part}" -eq 0 ]; then rm -f -- "${luks_key_file}" && printf '%b\n' "${luks_passphrase}" > "${luks_key_file}" cryptsetup -c aes-xts-plain -s 512 --use-random -y luksFormat "${hdd}"2 "${luks_passphrase}" --key-file "${luks_key_file}" || exit 2 cryptsetup luksOpen "${hdd}"2 "${luks_pv_name}" --key-file "${luks_key_file}" || exit 2 - pvcreate /dev/mapper/"${luks_pv_name}" - vgcreate "${vgname}" /dev/mapper/"${luks_pv_name}" + pvcreate /dev/mapper/"${luks_pv_name}" || exit 3 + vgcreate "${vgname}" /dev/mapper/"${luks_pv_name}" || exit 3 else - pvcreate "${hdd}"2 - vgcreate "${vgname}" "${hdd}"2 + pvcreate "${hdd}"2 || exit 3 + vgcreate "${vgname}" "${hdd}"2 || exit 3 fi fi -mkfs.ext3 -F -L boot -- "${hdd}"1 +mkfs.ext3 -F -L boot -- "${hdd}"1 || exit 4 ## }}} ## Create Logical Volumes {{{ @@ -106,18 +106,18 @@ fi ### Format LVs in ext4 cd -- /dev/"${vgname}" || exit 1 for lvname in *; do - mkfs.ext4 -F -L "${lvname}" -- "${lvname}" + mkfs.ext4 -F -L "${lvname}" -- "${lvname}" || exit 4 done cd -- - || exit 1 ### (re)format Btrfs LV if [ "${manage_btrfs}" -eq 0 ]; then ### Ensure to format Btrfs LV - mkfs.btrfs --force -L root -- /dev/"${vgname}"/root + mkfs.btrfs --force -L root -- /dev/"${vgname}"/root || exit 4 fi ### And format the swap -mkswap -L sw01 -- /dev/mapper/"${vgname}"-swap +mkswap -L sw01 -- /dev/mapper/"${vgname}"-swap || exit 4 ## }}} # }}} # Debootstrap {{{