summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-08-29 18:16:41 +0000
committerJohn Crispin <john@openwrt.org>2014-08-29 18:16:41 +0000
commit7f260ef6b7b9b7031b6a24ba5195a78472e04be0 (patch)
tree151d90ac9825b668b7b8bfb71aba17b5bf334302 /package
parent645ee59a2da0cd01d8d4f94a4812ff86451a9d5d (diff)
downloadmtk-20170518-7f260ef6b7b9b7031b6a24ba5195a78472e04be0.zip
mtk-20170518-7f260ef6b7b9b7031b6a24ba5195a78472e04be0.tar.gz
mtk-20170518-7f260ef6b7b9b7031b6a24ba5195a78472e04be0.tar.bz2
dropbear: add mdns support to the init.d script
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42326
Diffstat (limited to 'package')
-rwxr-xr-xpackage/network/services/dropbear/files/dropbear.init7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index c6f3d9b..5186523 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -46,14 +46,16 @@ validate_section_dropbear()
'BannerFile:file' \
'Port:list(port):22' \
'SSHKeepAlive:uinteger:300' \
- 'IdleTimeout:uinteger:0'
+ 'IdleTimeout:uinteger:0' \
+ 'mdns:uinteger:1'
}
dropbear_instance()
{
local PasswordAuth enable Interface GatewayPorts \
RootPasswordAuth RootLogin rsakeyfile \
- dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout \
+ mdns
validate_section_dropbear "${1}" || {
echo "validation failed"
@@ -77,6 +79,7 @@ dropbear_instance()
append_ports "${Interface}" "${Port}"
[ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
[ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ [ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
procd_close_instance
}