svn commit: trunk/buildroot/package/dropbear
Author: nkukard
Date: 2008-04-09 00:35:12 -0700 (Wed, 09 Apr 2008) New Revision: 21679
Log:
* Removed dropbear init patch
* Added dropbear init script
* Added more verbose messages about key generation
Added:
trunk/buildroot/package/dropbear/S50dropbear
Removed:
trunk/buildroot/package/dropbear/dropbear-init.patch
Modified:
trunk/buildroot/package/dropbear/dropbear.mk
Changeset:
Added: trunk/buildroot/package/dropbear/S50dropbear
===================================================================
buildroot/package/dropbear/S50dropbear +56 -0
@@ -0,0 +1,56 @@ +#!/bin/sh +# +# Starts dropbear sshd. +# + +# Make sure the dropbearkey progam exists +[ -f /usr/bin/dropbearkey ] || exit 0 + +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 + echo -n "generating rsa key... " + /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key > /dev/null 2>&1 + fi + + # Check for the Dropbear DSS key + if [ ! -f /etc/dropbear/dropbear_dss_host_key ] ; then + echo -n "generating dsa key... " + /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key > /dev/null 2>&1 + fi + umask 077 + start-stop-daemon -S -q -p /var/run/dropbear.pid --exec /usr/sbin/dropbear + echo "OK" +} +stop() { + echo -n "Stopping dropbear sshd: " + start-stop-daemon -K -q -p /var/run/dropbear.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? +
Deleted: trunk/buildroot/package/dropbear/dropbear-init.patch
===================================================================
buildroot/package/dropbear/dropbear-init.patch +0 -60
60 lines not on this page · raw message
Modified: trunk/buildroot/package/dropbear/dropbear.mk
===================================================================
buildroot/package/dropbear/dropbear.mk +1 -2
@@ -57,8 +57,7 @@ ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearkey ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearconvert mkdir -p $(TARGET_DIR)/etc/init.d - cp -dpf $(DROPBEAR_DIR)/S50dropbear $(TARGET_DIR)/etc/init.d/ - chmod a+x $(TARGET_DIR)/etc/init.d/S50dropbear + $(INSTALL) -m 755 package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d/S50dropbear dropbear: uclibc zlib $(TARGET_DIR)/$(DROPBEAR_TARGET_BINARY)
Quoted 4 lines · nkukard at uclibc.org
Author: nkukard
Date: 2008-04-09 00:35:12 -0700 (Wed, 09 Apr 2008) New Revision: 21679
Quoted 8 lines
Log:
* Removed dropbear init patch
* Added dropbear init script
* Added more verbose messages about key generationAdded:
trunk/buildroot/package/dropbear/S50dropbear
How about a configuration item to control installation of the init script? I want to start dropbear from inetd instead.
Hamish
Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Hamish" == Hamish Moffatt <[email protected]> writes:
Hi,
Quoted 2 lines
Quoted 2 lines
Added:
trunk/buildroot/package/dropbear/S50dropbear
Hamish> How about a configuration item to control installation of the init Hamish> script? I want to start dropbear from inetd instead.
Hmm, we would need to handle than more generically than just for dropbear. Do you use a custom device_table.txt? Maybe the easiest is simply to remove the execute permission on the init script with the device table, then your rcS shouldn't run it.
Signature · 1 line
Bye, Peter Korsgaard