Skip to content

Commit 0d11f67

Browse files
gbrdeadleggewie
authored andcommitted
Don't attempt to copy id_ecdsa if it is not needed.
1 parent 4ae394c commit 0d11f67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/fs-cryptroot-support.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function pre_install_kernel_debs__adjust_dropbear_configuration() {
7474
}
7575

7676
function post_umount_final_image__export_private_key(){
77-
if [[ $CRYPTROOT_SSH_UNLOCK == yes ]]; then
77+
if [[ $CRYPTROOT_SSH_UNLOCK == yes && -f "${DROPBEAR_DIR}"/id_ecdsa ]]; then
7878
CRYPTROOT_SSH_UNLOCK_KEY_PATH="${DESTIMG}/${version}.key"
7979
# copy dropbear ssh key to image output dir for convenience
8080
cp "${DROPBEAR_DIR}"/id_ecdsa "${CRYPTROOT_SSH_UNLOCK_KEY_PATH}"

0 commit comments

Comments
 (0)