Skip to contentSkip to conversation

svn commit: trunk/buildroot/package/dropbear

Buildroot nkukard at uclibc.org 3 participants 4 messages Apr 8, 2008

lore
Share & tools
lore
#0 lore raw

Author: nkukard
Date: 2008-04-08 10:47:29 -0700 (Tue, 08 Apr 2008) New Revision: 21673

Log:
* Generate keys for dropbear only when starting
* Generate keys silently

Modified:
trunk/buildroot/package/dropbear/dropbear-init.patch

Changeset:
Modified: trunk/buildroot/package/dropbear/dropbear-init.patch
===================================================================

buildroot/package/dropbear/dropbear-init.patch +19 -18
@@ -1,5 +1,6 @@
---- dropbear-0.42/S50dropbear
-+++ dropbear-0.42/S50dropbear
+diff -rNu dropbear-0.51_vanilla/S50dropbear dropbear-0.51_init/S50dropbear
+--- dropbear-0.51_vanilla/S50dropbear	1970-01-01 00:00:00.000000000 +0000
++++ dropbear-0.51_init/S50dropbear	2008-04-08 14:46:53.000000000 +0000
 @@ -0,0 +1,56 @@
 +#!/bin/sh
 +#
@@ -9,24 +10,24 @@
 +# Make sure the dropbearkey progam exists
 +[ -f /usr/bin/dropbearkey ] || exit 0
 +
-+# Check for the Dropbear RSA key
-+if [ ! -f /etc/dropbear/dropbear_rsa_host_key ] ; then
-+	echo Generating RSA Key...
-+	mkdir -p /etc/dropbear
-+	/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
-+fi
-+
-+# Check for the Dropbear DSS key
-+if [ ! -f /etc/dropbear/dropbear_dss_host_key ] ; then
-+	echo Generating DSS Key...
-+	mkdir -p /etc/dropbear
-+	/usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
-+fi
-+
-+umask 077
-+
 +start() {
 + 	echo -n "Starting dropbear sshd: "
++	# Make sure dropbear directory exists
++	if [ ! -d /etc/dropbear ] ; then
++		mkdir -p /etc/dropbear
++	fi
++	# Check for the Dropbear RSA key
++	if [ ! -f /etc/dropbear/dropbear_rsa_host_key ] ; then
++		/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key > /dev/null 2>&1
++		echo -n .
++	fi
++
++	# Check for the Dropbear DSS key
++	if [ ! -f /etc/dropbear/dropbear_dss_host_key ] ; then
++		/usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key > /dev/null 2>&1
++		echo -n .
++	fi
++	umask 077
 +	start-stop-daemon -S -q -p /var/run/dropbear.pid --exec /usr/sbin/dropbear
 +	echo "OK"
 +}
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"nkukard" == nkukard <[email protected]> writes:

nkukard> Author: nkukard
nkukard> Date: 2008-04-08 10:47:29 -0700 (Tue, 08 Apr 2008) nkukard> New Revision: 21673

nkukard> Log:
nkukard> * Generate keys for dropbear only when starting

nkukard> * Generate keys silently

Is that good? Generating keys takes a LONG time on most embedded systems, so having a bit of feedback would be good.

nkukard> Modified:
nkukard> trunk/buildroot/package/dropbear/dropbear-init.patch

Having this init script as a patch is kinda silly, let's simply add it under package/dropbear and copy it over to TARGET_DIR, E.G. like it's done for avahi.

(Yes, I know you didn't add the patch in the first place).

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw
Quoted 3 lines

Is that good? Generating keys takes a LONG time on most embedded systems, so having a bit of feedback would be good.

I can add something about generating keys on the same line?

Staring dropbear sshd: generating host keys...OK

how does that look? normal startup would be...

Starting dropbear sshd: OK

Quoted 8 lines

nkukard> Modified:
nkukard> trunk/buildroot/package/dropbear/dropbear-init.patch

Having this init script as a patch is kinda silly, let's simply add it under package/dropbear and copy it over to TARGET_DIR, E.G. like it's done for avahi.

(Yes, I know you didn't add the patch in the first place).

Duly noted, will add in my next commit together with a fix for the above.

-N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://busybox.net/lists/buildroot/attachments/20080408/caa944a0/attachment.pgp

#3 lore raw
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Nigel" == Nigel Kukard <[email protected]> writes:

Is that good? Generating keys takes a LONG time on most embedded systems, so having a bit of feedback would be good.

Nigel> I can add something about generating keys on the same line?

Nigel> Staring dropbear sshd: generating host keys...OK

Nigel> how does that look? normal startup would be...

Nigel> Starting dropbear sshd: OK

Sounds good.

nkukard> Modified:
nkukard> trunk/buildroot/package/dropbear/dropbear-init.patch

Quoted 6 lines
Quoted 6 lines

Having this init script as a patch is kinda silly, let's simply add it under package/dropbear and copy it over to TARGET_DIR, E.G. like it's done for avahi.

(Yes, I know you didn't add the patch in the first place).

Nigel> Duly noted, will add in my next commit together with a fix for the Nigel> above.

Great!

Signature · 1 line
Bye, Peter Korsgaard