From: John Crispin Date: Thu, 8 Oct 2009 18:58:15 +0000 (+0000) Subject: #4985 - fixes dropbear banner file, thanks Roman Yepishev X-Git-Tag: reboot~22203 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=76ff676a1e403fdb7a14dc199db07b052d9da9b3;p=openwrt%2Fstaging%2Flynxis.git #4985 - fixes dropbear banner file, thanks Roman Yepishev SVN-Revision: 18009 --- diff --git a/package/dropbear/files/dropbear.config b/package/dropbear/files/dropbear.config index e660ac7356..492d2a1742 100644 --- a/package/dropbear/files/dropbear.config +++ b/package/dropbear/files/dropbear.config @@ -1,3 +1,4 @@ config dropbear option PasswordAuth 'on' option Port '22' +# option BannerFile '/etc/banner' diff --git a/package/dropbear/files/dropbear.init b/package/dropbear/files/dropbear.init index c91d0a7166..30cb44b1b1 100755 --- a/package/dropbear/files/dropbear.init +++ b/package/dropbear/files/dropbear.init @@ -34,10 +34,14 @@ dropbear_start() # B) listen port local port config_get port "${section}" Port + # C) banner file + local bannerfile + config_get bannerfile ${section} BannerFile + [ -f $bannerfile ] || bannerfile='' # concatenate parameters 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 [ "${verbosed}" -ne 0 ] && echo "${initscript}: section ${section} starting ${PROG} ${args}"