dropbear: use config_get_bool enable
authorSergey Ponomarev <stokito@gmail.com>
Mon, 27 May 2024 23:50:09 +0000 (02:50 +0300)
committerPetr Štetiar <ynezz@true.cz>
Thu, 28 Nov 2024 18:47:56 +0000 (18:47 +0000)
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 4511fa4b30f73185597990ce563bbf3f96385292)
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
package/network/services/dropbear/Makefile
package/network/services/dropbear/files/dropbear.config
package/network/services/dropbear/files/dropbear.init

index e9f3bd693c617cac5dc638ac4ac1b4db9a165243..1918e7dec6d6ce61efc07e5c068df69738bdd2a0 100644 (file)
@@ -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:= \
index 2139ba0bbeaac71ccb88fce7f5c490198d7d5cd0..7eb59754490683f88f6909ad1d10aa9f104ece02 100644 (file)
@@ -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'
index 708fabd3269af24636ecc470f4027e42c898a719..395237f9bc206a716f4130d3e83746311d7e5031 100755 (executable)
@@ -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