aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dropbear
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-12-18 19:40:31 +0100
committerHans Dedecker <dedeckeh@gmail.com>2018-12-18 19:43:22 +0100
commit83109450ce9119a871efe8efd53b7aa07fecdcac (patch)
tree823fd296c351c84ba69c12ad73b7960b5c82d8d6 /package/network/services/dropbear
parent6835c13e5a81a96bd45b016a0013214d4a04286a (diff)
downloadupstream-83109450ce9119a871efe8efd53b7aa07fecdcac.tar.gz
upstream-83109450ce9119a871efe8efd53b7aa07fecdcac.tar.bz2
upstream-83109450ce9119a871efe8efd53b7aa07fecdcac.zip
dropbear: fix dropbear startup issue
Interface triggers are installed by the dropbear init script in case an interface is configured for a given dropbear uci section. As dropbear is started after network the interface trigger event can be missed during a small window; this is especially the case if lan is specified as interface. Fix this by starting dropbear before network so no interface trigger is missed. As dropbear is started earlier than netifd add a boot function to avoid the usage of network.sh functions as call to such functions will fail at boottime. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/network/services/dropbear')
-rw-r--r--package/network/services/dropbear/Makefile2
-rwxr-xr-xpackage/network/services/dropbear/files/dropbear.init10
2 files changed, 10 insertions, 2 deletions
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 460c38dc2a..0ed7199e68 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
PKG_VERSION:=2017.75
-PKG_RELEASE:=8
+PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index b86e52d8bc..eef2643c14 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -2,7 +2,7 @@
# Copyright (C) 2006-2010 OpenWrt.org
# Copyright (C) 2006 Carlos Sobrinho
-START=50
+START=19
STOP=50
USE_PROCD=1
@@ -59,6 +59,8 @@ dropbear_instance()
}
[ -n "${Interface}" ] && {
+ [ -n "${BOOT}" ] && return 0
+
network_get_ipaddrs_all ipaddrs "${Interface}" || {
echo "interface ${Interface} has no physdev or physdev has no suitable ip"
return 1
@@ -119,6 +121,12 @@ load_interfaces()
[ "${enable}" = "1" ] && interfaces=" ${interface} ${interfaces}"
}
+boot()
+{
+ BOOT=1
+ start "$@"
+}
+
start_service()
{
[ -s /etc/dropbear/dropbear_rsa_host_key ] || keygen