diff --git a/scripts/encryption/storage/base.sh b/scripts/encryption/storage/base.sh index 8656551..302439b 100644 --- a/scripts/encryption/storage/base.sh +++ b/scripts/encryption/storage/base.sh @@ -34,6 +34,7 @@ create_luks_key_and_update_cryptab(){ sudo dd if=/dev/urandom of="$secret_key_path" bs=512 count=8 && sudo cryptsetup -v luksAddKey "$2" "$secret_key_path" && info "Opening and closing device to verify that that everything works fine..." && + sudo cryptsetup -v luksClose "$1" && sudo cryptsetup -v luksOpen "$2" "$1" --key-file="$secret_key_path" && sudo cryptsetup -v luksClose "$1" && info "Reading UUID..." && diff --git a/scripts/encryption/storage/raid1/mount_on_boot.sh b/scripts/encryption/storage/raid1/mount_on_boot.sh index 1f39436..3967421 100644 --- a/scripts/encryption/storage/raid1/mount_on_boot.sh +++ b/scripts/encryption/storage/raid1/mount_on_boot.sh @@ -5,6 +5,8 @@ source "$(dirname "$(readlink -f "${0}")")/base.sh" || (echo "Loading base.sh fa info "Automount raid1 encrypted storages..." && set_raid1_devices_mount_partition_and_mapper_paths && create_luks_key_and_update_cryptab "$mapper_name_1" "$device_path_1" && +info "Creating mount folder unter \"$mount_path_1\"..." && +sudo mkdir -p "$mount_path_1" && create_luks_key_and_update_cryptab "$mapper_name_2" "$device_path_2" && update_fstab "$mapper_path_1" "$mount_path_1" && success "Installation finished. Please restart :)" ||