dropbear:

- faster starting
This commit is contained in:
Stephan Raue 2009-12-01 11:10:31 +01:00
parent c77a746f31
commit 1bcc5afa50

View File

@ -4,33 +4,35 @@
# #
# runlevels: openelec, text, debug # runlevels: openelec, text, debug
. /etc/sysconfig (
. /etc/sysconfig
if test "$OE_START_SSHSERVER" = "yes" \ if test "$OE_START_SSHSERVER" = "yes" \
-a -f /usr/bin/dropbearkey \ -a -f /usr/bin/dropbearkey \
-a -f /etc/issue ; then -a -f /etc/issue ; then
progress "Starting SSH Server" progress "Starting SSH Server"
# Check for the Dropbear RSA key # Check for the Dropbear RSA key
if [ ! -f /etc/dropbear/dropbear_rsa_host_key ] ; then if [ ! -f /etc/dropbear/dropbear_rsa_host_key ] ; then
progress "SSH: generating rsa key" progress "SSH: generating rsa key"
mkdir -p /etc/dropbear mkdir -p /etc/dropbear
/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key > /dev/null 2>&1 /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key > /dev/null 2>&1
fi fi
# Check for the Dropbear DSS key # Check for the Dropbear DSS key
if [ ! -f /etc/dropbear/dropbear_dss_host_key ] ; then if [ ! -f /etc/dropbear/dropbear_dss_host_key ] ; then
progress "SSH: generating dsa key" progress "SSH: generating dsa key"
mkdir -p /etc/dropbear mkdir -p /etc/dropbear
/usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key > /dev/null 2>&1 /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key > /dev/null 2>&1
fi fi
mkdir -p /var/log mkdir -p /var/log
touch /var/log/lastlog touch /var/log/lastlog
touch /var/log/wtmp touch /var/log/wtmp
/usr/sbin/dropbear -b /etc/issue -P /var/run/dropbear.pid & /usr/sbin/dropbear -b /etc/issue -P /var/run/dropbear.pid
fi fi
)&
exit 0 exit 0