From 73bc3b398ac6362165fbdaaa876f11a6c62f89fd Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 7 May 2008 17:37:37 +0000 Subject: 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 --- dnscache-model.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dnscache-model.lua') diff --git a/dnscache-model.lua b/dnscache-model.lua index a4835ea..aad55d8 100644 --- a/dnscache-model.lua +++ b/dnscache-model.lua @@ -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) -- cgit v1.2.3