coolsnowwolf / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
323 stars 613 forks source link

luci-app-smartdns 的conf.d 增加配置文件后多余了一对''号 #236

Open GreatMichaelLee opened 1 year ago

GreatMichaelLee commented 1 year ago

在高级设置->包含配置文件里,加入配置文件名后,最终在/var/etc/smartdns/smartdns.conf里生成的是这样的

conf-file ‘/etc/smartdns/smartdns-domains.china.conf’,

这样的多一个‘’ smartdns是识别不了的,要去掉引号,这个引号的加入可以在/etc/init.d/smartdns的 line 465找到。

conf_append_conf_files()
{
        local conf_file="$1"

        if [ "$1" != "${1#/}" ]; then
                fullpath="$1"
        else
                fullpath="$SMARTDNS_CONF_DOWNLOAD_DIR/$conf_file"
        fi

        [ -f "$fullpath" ] && {
                conf_append "conf-file" "'$fullpath'"
        }
}
lwb1978 commented 1 year ago

帮你反馈到插件作者那边去了: https://github.com/pymumu/smartdns/issues/1518