Commit 73bc3b39 authored by Ted Trask's avatar Ted Trask

Rewrote getopts.getoptsfromfile function to handle more complicated config...

Rewrote getopts.getoptsfromfile function to handle more complicated config files and removed getopts.getoptsfromfile_onperline function

git-svn-id: svn://svn.alpinelinux.org/acf/dnscache/trunk@1111 ab2d0c66-481e-0410-8bed-d214d4d58bed
parent 5a557232
......@@ -80,12 +80,12 @@ function getstatus()
status.ip = cfe({ name="ip",
label="Listening on",
value=config.IP,
value=config.IP or "",
})
status.cachesize = cfe({ name="cachesize",
label="Cache size",
value=humanreadable(config.CACHESIZE),
value=humanreadable(config.CACHESIZE or ""),
})
return status
......@@ -116,9 +116,9 @@ end
function getconfig()
if (fs.is_file(configfile)) then
return getopts.getoptsfromfile(configfile)
return getopts.getoptsfromfile(configfile, "") or {}
end
return false
return {}
end
function get_filedetails(self,num)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment