From 335d503c6f8c54ab66a02fc8454525b628bb9255 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Sat, 16 Feb 2008 11:13:56 +0000 Subject: Added a sampleconfig that shows some output. Still a long way to go git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@728 ab2d0c66-481e-0410-8bed-d214d4d58bed --- Makefile | 1 + sampleconfig.conf | 35 ++++++++++++++++++++ tinydns-config-html.lsp | 42 +++++++++++++++++++++++ tinydns-model.lua | 88 ++++++++++++++++++++++++++++++++++++++++++++++--- tinydns-status-html.lsp | 64 +++++++++++++++++++++++++++++++++++ 5 files changed, 226 insertions(+), 4 deletions(-) create mode 100755 sampleconfig.conf diff --git a/Makefile b/Makefile index e7dd2dd..a91e4fc 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ VERSION=0.1 APP_DIST=\ tinydns* \ + sampleconfig.conf \ EXTRA_DIST=README Makefile config.mk diff --git a/sampleconfig.conf b/sampleconfig.conf new file mode 100755 index 0000000..e3e7b7f --- /dev/null +++ b/sampleconfig.conf @@ -0,0 +1,35 @@ +%ex: +%in:192.168 +%se:192.168.1 +%se:192.168.2 +%se:192.168.5 + +Zme.org:ns1.you.org:iseng.me.org:2007082204:1200:2048:864000:3600::: +&me.org::ns1.you.org:3600:: +Zme.org:ns2.you.org.iseng.me.org:2007082204:1200:2048:864000:3600::: +&me.org::ns2.you.org:3600:: +Zme.org:ns3.you.org.iseng.me.org:2007082204:1200:2048:864000:3600::: +&me.org::ns3.you.org:3600:: + ++smtp.me.org:172.16.0.2:3600::in +=srv.me.org:208.74.141.33:3600:: +=xproxy1.me.org:172.16.0.3:3600::in +=xweb2.me.org:172.16.0.4:3600::in + +=www.me.org:208.74.141.33:3600:: +=me.org:208.74.141.33:3600:: +=test.me.org:208.74.141.33:3600:: +=www.test.me.org:208.74.141.33:3600:: +Cdownload.me.org:download.me.org.google.com:3600:: + ++mail1.se.me.org:213.234.126.132:3600:: ++mail2.se.me.org:213.234.126.132:3600:: + ++mail1.us.me.org:208.74.141.33:3600:: ++mail2.us.me.org:208.74.141.33:3600:: + +@me.org:213.234.126.132:mx2.me.org:20:3600::ex +@me.org:208.74.141.33:mx2.me.org:20:3600::in +@me.org:213.234.126.132:mx1.me.org:60:3600::ex +@me.org:208.74.141.33:mx1.me.org:60:3600::in + diff --git a/tinydns-config-html.lsp b/tinydns-config-html.lsp index eea9f6e..b3f9053 100755 --- a/tinydns-config-html.lsp +++ b/tinydns-config-html.lsp @@ -47,6 +47,48 @@ local tags = { "listen", } displayinfo(myform,tags) ?> +

Locations

+") +--for k,v in pairs(tags) do +if (myform[v]) and (myform[v]["value"]) then + local val = myform[v] + io.write("\t 0) then + val.class = "error" + io.write(" class='error'") + end + io.write(">" .. val.label .. "\n") + + + io.write("\t\t
\n") + for k,v in pairs(myform[v]["value"]) do + io.write(" " .. tostring(k) .. "") + for kk,vv in pairs(v) do + io.write(tostring("
" ..vv.option[3]).. "\n") + end + io.write("
") + end + + if (val.descr) and (#val.descr > 0) then io.write("\t\t

" .. string.gsub(val.descr, "\n", "
") .. "

\n") end + if (#val.errtxt > 0) then io.write("\t\t

" .. string.gsub(val.errtxt, "\n", "
") .. "

\n") end + io.write("\t\t
\n") +end +--end +io.write("") +?> + + + + + + + + + +

DEGUGGING

+

PROGRAM SPECIFIC OPTIONS/INFORMATION

+") +--for k,v in pairs(tags) do +if (myform[v]) and (myform[v]["value"]) then + local val = myform[v] + io.write("\t 0) then + val.class = "error" + io.write(" class='error'") + end + io.write(">" .. val.label .. "\n") + + + io.write("\t\t
\n") + for k,v in pairs(myform[v]["value"]) do + io.write(" " .. tostring(k) .. "") + for kk,vv in pairs(v) do + io.write(tostring("
" ..vv.option[3]).. "\n") + end + io.write("
") + end + + if (val.descr) and (#val.descr > 0) then io.write("\t\t

" .. string.gsub(val.descr, "\n", "
") .. "

\n") end + if (#val.errtxt > 0) then io.write("\t\t

" .. string.gsub(val.errtxt, "\n", "
") .. "

\n") end + io.write("\t\t
\n") +end +--end +io.write("") +?> + +") +--for k,v in pairs(tags) do +if (myform[v]) and (myform[v]["value"]) then + local val = myform[v] + io.write("\t 0) then + val.class = "error" + io.write(" class='error'") + end + io.write(">" .. val.label .. "\n") + + + io.write("\t\t
\n") + for k,v in pairs(myform[v]["value"]) do + io.write(" " .. tostring(k) .. "") + for kk,vv in pairs(v) do + io.write(tostring("
" ..vv.option[3]).. "\n") + end + io.write("
") + end + + if (val.descr) and (#val.descr > 0) then io.write("\t\t

" .. string.gsub(val.descr, "\n", "
") .. "

\n") end + if (#val.errtxt > 0) then io.write("\t\t

" .. string.gsub(val.errtxt, "\n", "
") .. "

\n") end + io.write("\t\t
\n") +end +--end +io.write("") +?> DEBUGGING

DEBUG INFO: CFE

") -- cgit v1.2.3