dropbear: use config_get_bool enable
The config_get_bool also works with on/off, yes/no, true/false.
Add 'main' section name. This will make it easier to change settings from uci.
Add a link to documentation.
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15579
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4511fa4b30)
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
committed by
Petr Štetiar
parent
7142e35777
commit
908975850d
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=dropbear
|
PKG_NAME:=dropbear
|
||||||
PKG_VERSION:=2024.85
|
PKG_VERSION:=2024.85
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
config dropbear
|
# See https://openwrt.org/docs/guide-user/base-system/dropbear
|
||||||
|
config dropbear main
|
||||||
|
option enable '1'
|
||||||
option PasswordAuth 'on'
|
option PasswordAuth 'on'
|
||||||
option RootPasswordAuth 'on'
|
option RootPasswordAuth 'on'
|
||||||
option Port '22'
|
option Port '22'
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ dropbear_instance()
|
|||||||
load_interfaces()
|
load_interfaces()
|
||||||
{
|
{
|
||||||
local enable
|
local enable
|
||||||
config_get enable "$1" enable 1
|
config_get_bool enable "$1" enable 1
|
||||||
[ "${enable}" = "1" ] || return 0
|
[ "${enable}" = "1" ] || return 0
|
||||||
|
|
||||||
local direct_iface iface
|
local direct_iface iface
|
||||||
|
|||||||
Reference in New Issue
Block a user