#4985 - fixes dropbear banner file, thanks Roman Yepishev
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18009 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
981db40f8f
commit
6ca9f5f2d7
|
@ -1,3 +1,4 @@
|
||||||
config dropbear
|
config dropbear
|
||||||
option PasswordAuth 'on'
|
option PasswordAuth 'on'
|
||||||
option Port '22'
|
option Port '22'
|
||||||
|
# option BannerFile '/etc/banner'
|
||||||
|
|
|
@ -34,10 +34,14 @@ dropbear_start()
|
||||||
# B) listen port
|
# B) listen port
|
||||||
local port
|
local port
|
||||||
config_get port "${section}" Port
|
config_get port "${section}" Port
|
||||||
|
# C) banner file
|
||||||
|
local bannerfile
|
||||||
|
config_get bannerfile ${section} BannerFile
|
||||||
|
[ -f $bannerfile ] || bannerfile=''
|
||||||
|
|
||||||
# concatenate parameters
|
# concatenate parameters
|
||||||
local args
|
local args
|
||||||
args="${nopasswd:+-s }${port:+-p ${port}} -P /var/run/${NAME}.${PIDCOUNT}.pid"
|
args="${nopasswd:+-s }${port:+-p ${port} }${bannerfile:+-b $bannerfile }-P /var/run/${NAME}.${PIDCOUNT}.pid"
|
||||||
|
|
||||||
# execute program and return its exit code
|
# execute program and return its exit code
|
||||||
[ "${verbosed}" -ne 0 ] && echo "${initscript}: section ${section} starting ${PROG} ${args}"
|
[ "${verbosed}" -ne 0 ] && echo "${initscript}: section ${section} starting ${PROG} ${args}"
|
||||||
|
|
Loading…
Reference in New Issue