CONFDIR=/etc/ddns-go CONF=/etc/ddns-go/ddnsgo-config.yaml get_config() { config_get_bool enabled $1 enabled 1 config_get_bool logger $1 logger 1 config_get port $1 port 9876 } ddnsgo_prepare() { pgrep -f /usr/bin/ddns-go | xargs kill -9 >/dev/null 2>&1 logger -t ddns...
config_get trigger $1 trigger"none" config_get dev $1 dev config_get ports $1 port config_get mode $1 mode"link"//link为默认值 config_get_bool default $1 default"nil" config_get delayon $1 delayon config_get delayoff $1 delayoff ...
接下来要遍历配置文件中的Section,可以使用“config_foreach 遍历函数名 Section类型”,例如我们可以这样: config_foreach run_njit login 然后我们去编写名为“run_njit”的函数,在这个函数中,我们可以使用“config_get 变量名 Section名 Section参数名”获取变量的值,或者使用“config_get_bool 变量名 Section名 Se...
dropbear: use config_get_bool enable Browse files 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...
是一个函数,主要作用是读取/etc/config/addtest中的内容,然后根据是否打开开关在第15行将配置传递给可执行文件addtest,由它根据配置执行指定的操作. 读取配置的方法,我强烈推荐你阅读官方文档,精炼而简洁. 获取布尔值类型:config_get_bool 变量名 Section名 Section参数名 ...
CONFIG_PACKAGE_ip6tables=y CONFIG_PACKAGE_kmod-ipt-nat6=y 1. 2. 配置给br-lan端口的ipv6地址前缀,在netifd里面已经实现了一个uci配置值ula_prefix,将/etc/config/network里面的ula_prefix设置成fd开头的内网地址 config globals 'globals' option ula_prefix 'fd00:eeee:eeee::/48' ...
"/etc/init.d/NicTestSH.sh start")endreturn m6. 在openwrt源码/qsdk/package/base-files/files/etc/init.d/NisTestSH.sh添加以下代码:#!/bin/sh etc/rc.commonSTART=50run_mobi(){ local enable config_get_bool enable $1 enable local collection config_get collection $1 collection if [ "$...
config_get port core port config_get_bool enabled core enabled [ $enabled -gt 0 -a -c $device ] && sleep 3 && $SSD -S -m -p $PIDF -q -x $PROG -- --input "input_uvc.so -y -f 10 -r 320*240 -q 50 -d /dev/video0" -o "output_http.so -p 9393 -w /www/camwww"...
This is what I get when I rungrep config_get /etc/init.d/chronydagainst OpenWRT 23.05.5 config_get_bool disabled "$cfg" disabled 0 [ -z "$hostname" ] && config_get hostname "$cfg" hostname config_get minpoll "$cfg" minpoll ...
你不应该以root身份运行configure(在环境中设置FORCE_UNSAFE_CONFIGURE=1来绕过这个检查)参见`config.log...