diff --git a/root/etc/uci-defaults/luci-homeproxy-migration b/root/etc/uci-defaults/luci-homeproxy-migration index a31c62f7..43f7e5a2 100644 --- a/root/etc/uci-defaults/luci-homeproxy-migration +++ b/root/etc/uci-defaults/luci-homeproxy-migration @@ -2,14 +2,15 @@ china_dns_server="$(uci -q get "homeproxy.config.china_dns_server")" if [ "$china_dns_server" = "wan_114" ]; then - uci -q delete homeproxy.config.china_dns_server + uci -q delete "homeproxy.config.china_dns_server" uci -q add_list "homeproxy.config.china_dns_server"="wan" uci -q add_list "homeproxy.config.china_dns_server"="114.114.114.114" elif echo "$china_dns_server" | grep -q ","; then - uci -q delete homeproxy.config.china_dns_server + uci -q delete "homeproxy.config.china_dns_server" for dns in ${china_dns_server//,/ }; do uci -q add_list "homeproxy.config.china_dns_server"="$dns" done fi +[ -z "$(uci -q changes "homeproxy")" ] || uci -q commit "homeproxy" exit 0