X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/49e1c4a590c086e096b156ac5a8474d40a5f0e77..202ebdce2de2126f25cf940214da250ed1dc0794:/package/dropbear/files/dropbear.init diff --git a/package/dropbear/files/dropbear.init b/package/dropbear/files/dropbear.init index 2ea547267..b629c1e48 100755 --- a/package/dropbear/files/dropbear.init +++ b/package/dropbear/files/dropbear.init @@ -5,10 +5,10 @@ config_cb() { local cfg="$CONFIG_SECTION" local nopasswd - local type - config_get cfgtype "$cfg" TYPE + local cfgt + config_get cfgt "$cfg" TYPE - case "$cfgtype" in + case "$cfgt" in dropbear) config_get passauth $cfg PasswordAuth config_get port $cfg Port @@ -16,7 +16,7 @@ config_cb() { case "$passauth" in no|off|disabled|0) nopasswd=1;; esac - DROPBEAR_ARGS="${port:+-p $port} ${nopasswd:+-s}" + DROPBEAR_ARGS="${nopasswd:+-s }${port:+-p $port}" ;; esac } @@ -29,7 +29,7 @@ keygen() { # generate missing keys mkdir -p /tmp/dropbear [ -x /usr/bin/dropbearkey ] && { - /usr/bin/dropbearkey -t $keytype -f /etc/$key 2>&- >&- && exec /etc/rc.common "$initscript" start + /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start } & exit 0 }