diff options
author | Michael Glembotzki <m.glembo@gmail.com> | 2024-04-22 18:39:38 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-04-23 13:40:24 +0100 |
commit | 6045314d2968f6f5a0877a4dd45f35c766a40e40 (patch) | |
tree | 0675d34456025b68290cad53051b9f8e81c256bf /meta/classes-recipe | |
parent | e3dd871f19f65d6fd11e19e9c2612ab1be4eb139 (diff) | |
download | poky-6045314d2968f6f5a0877a4dd45f35c766a40e40.tar.gz |
rootfs-postcommands.bbclass: Only set DROPBEAR_RSAKEY_DIR once
If DROPBEAR_RSAKEY_DIR has already been set before, e.g. by overwriting
the file dropbear.default, the line will still be appended a second time.
DROPBEAR_RSAKEY_DIR="/path/to/dropbear"
DROPBEAR_EXTRA_ARGS="-B"
DROPBEAR_RSAKEY_DIR=/var/lib/dropbear
(From OE-Core rev: 943c6acf855fd9de592f0b77828242c2c6e0869f)
Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r-- | meta/classes-recipe/rootfs-postcommands.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index e81b69a239..920da94ba2 100644 --- a/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/meta/classes-recipe/rootfs-postcommands.bbclass | |||
@@ -206,7 +206,9 @@ read_only_rootfs_hook () { | |||
206 | # Also tweak the key location for dropbear in the same way. | 206 | # Also tweak the key location for dropbear in the same way. |
207 | if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then | 207 | if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then |
208 | if [ ! -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then | 208 | if [ ! -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then |
209 | echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear | 209 | if ! grep -q "^DROPBEAR_RSAKEY_DIR=" ${IMAGE_ROOTFS}/etc/default/dropbear ; then |
210 | echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear | ||
211 | fi | ||
210 | fi | 212 | fi |
211 | fi | 213 | fi |
212 | fi | 214 | fi |