diff mbox

[2/2] dropbear: If a host key exists in /etc/dropbear it will be used - even for ro fs

Message ID 7fce085bfb56ac0f4297f417bfa702702f864e7c.1383295764.git.kibo@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

Kim Bøndergaard Nov. 1, 2013, 8:55 a.m. UTC
---
 recipes/dropbear/dropbear/init | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Esben Haabendal Nov. 27, 2013, 1:29 p.m. UTC | #1
Merged to master, thanks.

/Esben
diff mbox

Patch

diff --git a/recipes/dropbear/dropbear/init b/recipes/dropbear/dropbear/init
index 90de8e9..b05997e 100755
--- a/recipes/dropbear/dropbear/init
+++ b/recipes/dropbear/dropbear/init
@@ -45,6 +45,12 @@  else
   DROPBEAR_DSSKEY_DEFAULT="/etc/dropbear/dropbear_dss_host_key"
 fi
 
+# If /etc file exist use this despite readonly
+test -e /etc/dropbear/dropbear_rsa_host_key && \
+	DROPBEAR_RSAKEY_DEFAULT="/etc/dropbear/dropbear_rsa_host_key"
+test -e /etc/dropbear/dropbear_dss_host_key && \
+	DROPBEAR_DSSKEY_DEFAULT="/etc/dropbear/dropbear_dss_host_key"
+
 test -z "$DROPBEAR_BANNER" || \
   DROPBEAR_EXTRA_ARGS="$DROPBEAR_EXTRA_ARGS -b $DROPBEAR_BANNER"
 test -n "$DROPBEAR_RSAKEY" || \