diff --git a/luci-app-koolddns/luasrc/controller/koolddns.lua b/luci-app-koolddns/luasrc/controller/koolddns.lua index a06c5de..bccd48e 100644 --- a/luci-app-koolddns/luasrc/controller/koolddns.lua +++ b/luci-app-koolddns/luasrc/controller/koolddns.lua @@ -11,7 +11,7 @@ end function act_nslookup() local e={} e.index=luci.http.formvalue("index") -e.value=luci.sys.exec("nslookup %q localhost 2>&1|grep 'Address 1:'|tail -n1|cut -d' ' -f3"%luci.http.formvalue("domain")) +e.value=luci.sys.exec("nslookup %q localhost 2>&1|grep 'Address:'|tail -n1|cut -d' ' -f2"%luci.http.formvalue("domain")) luci.http.prepare_content("application/json") luci.http.write_json(e) end diff --git a/luci-app-koolddns/luasrc/model/cbi/koolddns/global.lua b/luci-app-koolddns/luasrc/model/cbi/koolddns/global.lua index 21c2aa3..7e9a1fa 100644 --- a/luci-app-koolddns/luasrc/model/cbi/koolddns/global.lua +++ b/luci-app-koolddns/luasrc/model/cbi/koolddns/global.lua @@ -58,12 +58,7 @@ if t==""then return""end local t=luci.sys.exec("ifconfig %q|grep 'inet addr'|awk '{print $2}'|cut -d: -f2"%t)or"" return t end -e=t:option(DummyValue,"nslookupip",translate("Nslookup").." IP") -e.width="15%" -e.template="koolddns/domain" -e.cfgvalue=function(t,t) -return o -end + e=t:option(Flag,"enable",translate("Enable State")) e.width="10%" e.rmempty=false