aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/network/services/dropbear/Makefile2
-rwxr-xr-xpackage/network/services/dropbear/files/dropbear.init22
2 files changed, 22 insertions, 2 deletions
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 593e0a81bf..8d4e7bc7fa 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:=2015.71
-PKG_RELEASE:=2
+PKG_RELEASE:=3
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 03745c995b..5c3345d40c 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -106,6 +106,12 @@ keygen()
chmod 0700 /etc/dropbear
}
+load_interfaces()
+{
+ config_get interface "$1" Interface
+ interfaces=" ${interface} ${interfaces}"
+}
+
start_service()
{
[ -s /etc/dropbear/dropbear_rsa_host_key ] || keygen
@@ -119,7 +125,21 @@ start_service()
service_triggers()
{
- procd_add_reload_trigger "dropbear"
+ local interfaces
+
+ procd_open_trigger
+ procd_add_config_trigger "config.change" "dropbear" /etc/init.d/dropbear reload
+
+ config_load "${NAME}"
+ config_foreach load_interfaces dropbear
+
+ [ -n "${interfaces}" ] & {
+ for n in $interfaces ; do
+ procd_add_interface_trigger "interface.*" $n /etc/init.d/dropbear reload
+ done
+ }
+ procd_close_trigger
+
procd_add_validation validate_section_dropbear
}