[openwrt/openwrt] dropbear: use config_get_bool enable
LEDE Commits
lede-commits at lists.infradead.org
Sun Nov 17 07:43:00 PST 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4511fa4b30f73185597990ce563bbf3f96385292
commit 4511fa4b30f73185597990ce563bbf3f96385292
Author: Sergey Ponomarev <stokito at gmail.com>
AuthorDate: Tue May 28 02:50:09 2024 +0300
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 at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15579
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
package/network/services/dropbear/Makefile | 2 +-
package/network/services/dropbear/files/dropbear.config | 4 +++-
package/network/services/dropbear/files/dropbear.init | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index e9f3bd693c..1918e7dec6 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
PKG_VERSION:=2024.85
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
diff --git a/package/network/services/dropbear/files/dropbear.config b/package/network/services/dropbear/files/dropbear.config
index 2139ba0bbe..7eb5975449 100644
--- a/package/network/services/dropbear/files/dropbear.config
+++ b/package/network/services/dropbear/files/dropbear.config
@@ -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 RootPasswordAuth 'on'
option Port '22'
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index 708fabd326..395237f9bc 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -361,7 +361,7 @@ dropbear_instance()
load_interfaces()
{
local enable
- config_get enable "$1" enable 1
+ config_get_bool enable "$1" enable 1
[ "${enable}" = "1" ] || return 0
local direct_iface iface
More information about the lede-commits
mailing list