The config_get_bool function parses not just the 1 but on/yes, true/false or enabled/disabled.
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
PKG_NAME:=atftp
PKG_VERSION:=0.8.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
config_load atftpd
- config_get enable service enable 0
+ config_get_bool enable service enable 0
[ "$enable" -eq "0" ] && return 0
config_get srv service path "/srv/tftp"
PKG_NAME:=dcwapd
PKG_VERSION:=1.1.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
config_load "$CONFIGURATION"
local enabled
- config_get enabled general enabled
+ config_get_bool enabled general enabled
if [ "$enabled" != "1" ]; then
echo "dcwapd is disabled in UCI"
return 1
PKG_NAME:=dnsproxy
PKG_VERSION:=0.71.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
is_enabled() {
local enabled
- config_get enabled "$1" "$2" "0"
+ config_get_bool enabled "$1" "$2" "0"
if [ "$enabled" -eq "1" ]; then
return 0
else
include $(TOPDIR)/rules.mk
PKG_NAME:=hs20
-PKG_RELEASE:=9
+PKG_RELEASE:=10
PKG_SOURCE_URL:=http://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git
start_service() {
local enabled
config_load hs20
- config_get enabled server enabled
+ config_get_bool enabled server enabled
[ "$enabled" != "1" ] && [ "$enabled" != "true" ] && exit 0
echo "starting"
PKG_NAME:=mwan3
PKG_VERSION:=2.11.13
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \
Aaron Goodman <aaronjg@alumni.stanford.edu>
PKG_LICENSE:=GPL-2.0
config_get family "$1" family ipv4
network_get_device device "$1"
[ -z "$device" ] && return
- config_get enabled "$1" enabled
+ config_get_bool enabled "$1" enabled
[ "$enabled" -eq 0 ] && return
curr_table=$(eval "echo \"\$mwan3_dev_tbl_${family}\"")
export "mwan3_dev_tbl_$family=${curr_table}${device}=$_tid "
mwan3_get_iface_id id "$1"
network_get_device device "$1"
- config_get enabled "$1" enabled 0
+ config_get_bool enabled "$1" enabled 0
config_get family "$1" family ipv4
if [ "$family" = "ipv4" ]; then
online=$(get_online_time "$iface")
offline=$(get_offline_time "$iface")
- config_get enabled "$iface" enabled 0
+ config_get_bool enabled "$iface" enabled 0
if [ -f "$MWAN3TRACK_STATUS_DIR/${iface}/STATUS" ]; then
network_get_uptime uptime "$iface"
PKG_NAME:=natmap
PKG_VERSION:=20240303
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/heiher/natmap/releases/download/$(PKG_VERSION)
load_interfaces() {
config_get interface "$1" interface
- config_get enable "$1" enable 1
+ config_get_bool enable "$1" enable 1
[ "${enable}" = "1" ] && interfaces=" ${interface} ${interfaces}"
}
PKG_NAME:=respondd
PKG_SOURCE_DATE:=2019-05-01
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/freifunk-gluon/respondd.git
{
config_get group "$1" group
config_get interfaces "$1" interface
- config_get disabled "$1" disabled 0
+ config_get_bool disabled "$1" disabled 0
if [ "$disabled" -gt "0" ]; then
return
PKG_NAME:=collectd
PKG_VERSION:=5.12.0
-PKG_RELEASE:=50
+PKG_RELEASE:=51
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
local enable keys key option value
- config_get enable "$cfg" enable 0
+ config_get_bool enable "$cfg" enable 0
[ "$enable" = "1" ] || return 0
[ -f "/usr/lib/collectd/$cfg.so" ] || {