瀏覽代碼

dropbear: Add config options to allow specification of host key files, thanks Scott Merrilees and Matthias Buecher (#7824)

SVN-Revision: 23148
Vasilis Tsiligiannis 15 年之前
父節點
當前提交
faf45b7316
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      package/dropbear/files/dropbear.init

+ 5 - 0
package/dropbear/files/dropbear.init

@@ -52,6 +52,11 @@ dropbear_start()
 	# F) root login
 	config_get_bool val "${section}" RootLogin 1
 	[ "${val}" -eq 0 ] && append args "-w"
+	# G) host keys
+	config_get val "${section}" rsakeyfile
+	[ -f "${val}" ] && append args "-r ${val}"
+	config_get val "${section}" dsskeyfile
+	[ -f "${val}" ] && append args "-d ${val}"
 
 	# execute program and return its exit code
 	[ "${verbosed}" -ne 0 ] && echo "${initscript}: section ${section} starting ${PROG} ${args}"