Skip to content
Snippets Groups Projects
Commit 7f260ef6 authored by John Crispin's avatar John Crispin
Browse files

dropbear: add mdns support to the init.d script


Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>

SVN-Revision: 42326
parent 645ee59a
No related branches found
No related tags found
No related merge requests found
...@@ -46,14 +46,16 @@ validate_section_dropbear() ...@@ -46,14 +46,16 @@ validate_section_dropbear()
'BannerFile:file' \ 'BannerFile:file' \
'Port:list(port):22' \ 'Port:list(port):22' \
'SSHKeepAlive:uinteger:300' \ 'SSHKeepAlive:uinteger:300' \
'IdleTimeout:uinteger:0' 'IdleTimeout:uinteger:0' \
'mdns:uinteger:1'
} }
dropbear_instance() dropbear_instance()
{ {
local PasswordAuth enable Interface GatewayPorts \ local PasswordAuth enable Interface GatewayPorts \
RootPasswordAuth RootLogin rsakeyfile \ RootPasswordAuth RootLogin rsakeyfile \
dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout \
mdns
validate_section_dropbear "${1}" || { validate_section_dropbear "${1}" || {
echo "validation failed" echo "validation failed"
...@@ -77,6 +79,7 @@ dropbear_instance() ...@@ -77,6 +79,7 @@ dropbear_instance()
append_ports "${Interface}" "${Port}" append_ports "${Interface}" "${Port}"
[ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}" [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
[ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}" [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
[ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
procd_close_instance procd_close_instance
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment