From b0ed105e9ab6c60ffd2ddafdfff6890b5cc46ed8 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Wed, 13 Jul 2022 14:29:48 +0200 Subject: [PATCH] board: pluto :device_persistent_keys: Copy all generated keys to flash This fixes and issue where originally a RSA key is generated. We compute the md5 but later the files is missing. Signed-off-by: Michael Hennerich --- board/pluto/device_persistent_keys | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/pluto/device_persistent_keys b/board/pluto/device_persistent_keys index bd3a7f7d1b6..a67d3a8db2d 100644 --- a/board/pluto/device_persistent_keys +++ b/board/pluto/device_persistent_keys @@ -8,9 +8,9 @@ cat /proc/mounts | grep -q mtd2 || (echo "Filesystem not mounted use device_form #dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key [[ ! -f ${KEYFILE} ]] && dropbearkey -t ecdsa -f ${KEYFILE} -install -D ${KEYFILE} -t /mnt/jffs2/etc/dropbear +install -D /etc/dropbear/dropbear_* -t /mnt/jffs2/etc/dropbear cd /etc/dropbear -md5sum dropbear* /etc/dropbear/ 2>/dev/null > /mnt/jffs2/etc/dropbear/keys.md5 +md5sum dropbear_* /etc/dropbear/ 2>/dev/null > /mnt/jffs2/etc/dropbear/keys.md5 if [ -f ${IDFILE} ]; then install -D ${IDFILE} -t /mnt/jffs2/root/.ssh