|
@ -10,7 +10,7 @@ |
|
|
# |
|
|
# |
|
|
LC_ALL=C |
|
|
LC_ALL=C |
|
|
PATH="/usr/sbin:/usr/bin:/sbin:/bin" |
|
|
PATH="/usr/sbin:/usr/bin:/sbin:/bin" |
|
|
adb_ver="3.8.1" |
|
|
|
|
|
|
|
|
adb_ver="3.8.2" |
|
|
adb_sysver="unknown" |
|
|
adb_sysver="unknown" |
|
|
adb_enabled=0 |
|
|
adb_enabled=0 |
|
|
adb_debug=0 |
|
|
adb_debug=0 |
|
@ -320,6 +320,9 @@ f_uci() |
|
|
/etc/init.d/firewall reload >/dev/null 2>&1 |
|
|
/etc/init.d/firewall reload >/dev/null 2>&1 |
|
|
;; |
|
|
;; |
|
|
*) |
|
|
*) |
|
|
|
|
|
> "${adb_dnsdir}/${adb_dnsfile}" |
|
|
|
|
|
f_count |
|
|
|
|
|
f_jsnup "running" |
|
|
/etc/init.d/"${adb_dns}" reload >/dev/null 2>&1 |
|
|
/etc/init.d/"${adb_dns}" reload >/dev/null 2>&1 |
|
|
;; |
|
|
;; |
|
|
esac |
|
|
esac |
|
@ -372,7 +375,7 @@ f_extconf() |
|
|
if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
then |
|
|
then |
|
|
uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile "${adb_dnsdir}/${adb_dnsfile}" |
|
|
uci_set dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile "${adb_dnsdir}/${adb_dnsfile}" |
|
|
if [ "${adb_enabled}" -eq 1 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
|
|
|
|
|
|
if [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
then |
|
|
then |
|
|
uci -q del_list dhcp.@dnsmasq[${adb_dnsinstance}].addnhosts="${adb_dnsdir}/${adb_dnsfile}" |
|
|
uci -q del_list dhcp.@dnsmasq[${adb_dnsinstance}].addnhosts="${adb_dnsdir}/${adb_dnsfile}" |
|
|
fi |
|
|
fi |
|
@ -385,7 +388,7 @@ f_extconf() |
|
|
if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
if [ "${adb_enabled}" -eq 1 ] && [ -z "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" addnhosts | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
then |
|
|
then |
|
|
uci -q add_list dhcp.@dnsmasq[${adb_dnsinstance}].addnhosts="${adb_dnsdir}/${adb_dnsfile}" |
|
|
uci -q add_list dhcp.@dnsmasq[${adb_dnsinstance}].addnhosts="${adb_dnsdir}/${adb_dnsfile}" |
|
|
if [ "${adb_enabled}" -eq 1 ] && [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
|
|
|
|
|
|
if [ -n "$(uci_get dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile | grep -Fo "${adb_dnsdir}/${adb_dnsfile}")" ] |
|
|
then |
|
|
then |
|
|
uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile |
|
|
uci_remove dhcp "@dnsmasq[${adb_dnsinstance}]" serversfile |
|
|
fi |
|
|
fi |
|
@ -506,7 +509,6 @@ f_dnsup() |
|
|
fi |
|
|
fi |
|
|
;; |
|
|
;; |
|
|
esac |
|
|
esac |
|
|
sleep 1 |
|
|
|
|
|
adb_rc=0 |
|
|
adb_rc=0 |
|
|
break |
|
|
break |
|
|
fi |
|
|
fi |
|
@ -735,7 +737,7 @@ f_query() |
|
|
field=2 |
|
|
field=2 |
|
|
elif [ "${adb_dnsvariant% *}" = "null" ] |
|
|
elif [ "${adb_dnsvariant% *}" = "null" ] |
|
|
then |
|
|
then |
|
|
prefix=".*[\\t\\.]" |
|
|
|
|
|
|
|
|
prefix="0\\..*[\\t\\.]" |
|
|
suffix="" |
|
|
suffix="" |
|
|
field=2 |
|
|
field=2 |
|
|
fi |
|
|
fi |
|
@ -1022,7 +1024,7 @@ f_main() |
|
|
adb_tmpfile="${tmp_file}" |
|
|
adb_tmpfile="${tmp_file}" |
|
|
f_list merge |
|
|
f_list merge |
|
|
|
|
|
|
|
|
# overall sort and dns restart |
|
|
|
|
|
|
|
|
# tld compression and dns restart |
|
|
# |
|
|
# |
|
|
if [ -s "${adb_tmpdir}"/"${adb_dnsfile}" ] |
|
|
if [ -s "${adb_tmpdir}"/"${adb_dnsfile}" ] |
|
|
then |
|
|
then |
|
|