增加配置文件后多余了一对''单引号
lwb1978 opened this issue · 2 comments
lwb1978 commented
在lede luci的issue上看到的,转过来反馈一下:
在高级设置->包含配置文件里,加入配置文件名后,最终在/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'"
}
}
PikuZheng commented
但是理论上文件路径应该用''
,一旦路径中有空格呢