dropbear: Don't install to/use /var/run.
This commit is contained in:
parent
58552ec46e
commit
5ccab7e844
1 changed files with 20 additions and 20 deletions
|
@ -4,33 +4,33 @@
|
||||||
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-misc/dropbear/files/dropbear.init.d,v 1.2 2004/07/14 23:57:35 agriffis Exp $
|
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-misc/dropbear/files/dropbear.init.d,v 1.2 2004/07/14 23:57:35 agriffis Exp $
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
use logger dns
|
use logger dns
|
||||||
need net
|
need net
|
||||||
}
|
}
|
||||||
|
|
||||||
check_config() {
|
check_config() {
|
||||||
if [ ! -e /etc/dropbear/ ] ; then
|
if [ ! -e /etc/dropbear/ ] ; then
|
||||||
mkdir /etc/dropbear/
|
mkdir /etc/dropbear/
|
||||||
fi
|
fi
|
||||||
if [ ! -e /etc/dropbear/dropbear_dss_host_key ] ; then
|
if [ ! -e /etc/dropbear/dropbear_dss_host_key ] ; then
|
||||||
einfo "Generating DSS-Hostkey..."
|
einfo "Generating DSS-Hostkey..."
|
||||||
/usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
|
/usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
|
||||||
fi
|
fi
|
||||||
if [ ! -e /etc/dropbear/dropbear_rsa_host_key ] ; then
|
if [ ! -e /etc/dropbear/dropbear_rsa_host_key ] ; then
|
||||||
einfo "Generating RSA-Hostkey..."
|
einfo "Generating RSA-Hostkey..."
|
||||||
/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
|
/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
check_config || return 1
|
check_config || return 1
|
||||||
ebegin "Starting dropbear"
|
ebegin "Starting dropbear"
|
||||||
/usr/sbin/dropbear ${DROPBEAR_OPTS}
|
/usr/sbin/dropbear ${DROPBEAR_OPTS}
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
ebegin "Stopping dropbear"
|
ebegin "Stopping dropbear"
|
||||||
start-stop-daemon --stop --pidfile /var/run/dropbear.pid
|
start-stop-daemon --stop --pidfile /run/dropbear.pid
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue