Don't attempt to copy id_ecdsa if it is not needed.

This commit is contained in:
Vladimir Panov 2025-07-30 21:51:52 +03:00 committed by leggewie
parent 4ae394cc4d
commit 0d11f67c23
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ function pre_install_kernel_debs__adjust_dropbear_configuration() {
}
function post_umount_final_image__export_private_key(){
if [[ $CRYPTROOT_SSH_UNLOCK == yes ]]; then
if [[ $CRYPTROOT_SSH_UNLOCK == yes && -f "${DROPBEAR_DIR}"/id_ecdsa ]]; then
CRYPTROOT_SSH_UNLOCK_KEY_PATH="${DESTIMG}/${version}.key"
# copy dropbear ssh key to image output dir for convenience
cp "${DROPBEAR_DIR}"/id_ecdsa "${CRYPTROOT_SSH_UNLOCK_KEY_PATH}"