mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-26 04:36:33 +00:00
dropbear: bump to version 2013.62
Bump to version 2013.62 with ECC support. Switch the initscript to on-demand key generation and add systemd unit file. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
3568f78f7e
commit
408743d29d
@ -3,34 +3,20 @@
|
|||||||
# Starts dropbear sshd.
|
# Starts dropbear sshd.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Make sure the dropbearkey progam exists
|
|
||||||
[ -f /usr/bin/dropbearkey ] || exit 0
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
echo -n "Starting dropbear sshd: "
|
echo -n "Starting dropbear sshd: "
|
||||||
# Make sure dropbear directory exists
|
# Make sure dropbear directory exists
|
||||||
if [ ! -d /etc/dropbear ] ; then
|
if [ ! -d /etc/dropbear ] ; then
|
||||||
mkdir -p /etc/dropbear
|
mkdir -p /etc/dropbear
|
||||||
fi
|
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
|
umask 077
|
||||||
start-stop-daemon -S -q -p /var/run/dropbear.pid --exec /usr/sbin/dropbear
|
start-stop-daemon -S -q -p /var/run/dropbear.pid --exec /usr/sbin/dropbear -- -R
|
||||||
echo "OK"
|
[ $? == 0 ] && echo "OK" || echo "FAIL"
|
||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
echo -n "Stopping dropbear sshd: "
|
echo -n "Stopping dropbear sshd: "
|
||||||
start-stop-daemon -K -q -p /var/run/dropbear.pid
|
start-stop-daemon -K -q -p /var/run/dropbear.pid
|
||||||
echo "OK"
|
[ $? == 0 ] && echo "OK" || echo "FAIL"
|
||||||
}
|
}
|
||||||
restart() {
|
restart() {
|
||||||
stop
|
stop
|
||||||
@ -53,4 +39,3 @@ case "$1" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
DROPBEAR_VERSION = 2013.60
|
DROPBEAR_VERSION = 2013.62
|
||||||
DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
|
DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
|
||||||
DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
|
DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
|
||||||
DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh
|
DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh
|
||||||
@ -24,8 +24,8 @@ endef
|
|||||||
|
|
||||||
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_XAUTH
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_XAUTH
|
||||||
|
|
||||||
define DROPBEAR_DISABLE_REVERSE_DNS
|
define DROPBEAR_ENABLE_REVERSE_DNS
|
||||||
$(SED) 's:\(#define DO_HOST_LOOKUP\):/*\1 */:' $(@D)/options.h
|
$(SED) 's:.*\(#define DO_HOST_LOOKUP\).*:\1:' $(@D)/options.h
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define DROPBEAR_BUILD_SMALL
|
define DROPBEAR_BUILD_SMALL
|
||||||
@ -43,6 +43,14 @@ define DROPBEAR_DISABLE_STANDALONE
|
|||||||
$(SED) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D)/options.h
|
$(SED) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D)/options.h
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define DROPBEAR_INSTALL_INIT_SYSTEMD
|
||||||
|
$(INSTALL) -D -m 644 package/dropbear/dropbear.service \
|
||||||
|
$(TARGET_DIR)/etc/systemd/system/dropbear.service
|
||||||
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||||
|
ln -fs ../dropbear.service \
|
||||||
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dropbear.service
|
||||||
|
endef
|
||||||
|
|
||||||
ifeq ($(BR2_USE_MMU),y)
|
ifeq ($(BR2_USE_MMU),y)
|
||||||
define DROPBEAR_INSTALL_INIT_SYSV
|
define DROPBEAR_INSTALL_INIT_SYSV
|
||||||
$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
|
$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
|
||||||
@ -52,8 +60,8 @@ else
|
|||||||
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y)
|
ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),)
|
||||||
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_REVERSE_DNS
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_ENABLE_REVERSE_DNS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL),y)
|
ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL),y)
|
||||||
|
10
package/dropbear/dropbear.service
Normal file
10
package/dropbear/dropbear.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Dropbear SSH daemon
|
||||||
|
After=syslog.target network.target auditd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/dropbear -F -R
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user