diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-10-03 12:42:13 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-10-03 12:42:13 +0000 |
commit | aba173b48fbcb3c9079d85fd88e9639fb6d349b5 (patch) | |
tree | 68baa8c0ed1f22666c40e10c3b2b97c1d7b757c5 | |
parent | a185bea39ff2c99c138665640b31dfbe68269350 (diff) | |
download | acf-dnscache-aba173b48fbcb3c9079d85fd88e9639fb6d349b5.tar.bz2 acf-dnscache-aba173b48fbcb3c9079d85fd88e9639fb6d349b5.tar.xz |
Modified format library. parse_configfile2, update_configfile2, get_section, and set_section became parse_ini_file, update_ini_file, get_ini_section, and set_ini_section. Updated all code that used these functions.
git-svn-id: svn://svn.alpinelinux.org/acf/dnscache/trunk@1539 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | dnscache-model.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dnscache-model.lua b/dnscache-model.lua index d3db087..f098caf 100644 --- a/dnscache-model.lua +++ b/dnscache-model.lua @@ -68,7 +68,7 @@ function getstatus() end function getconfig() - local conf = format.parse_configfile2(fs.read_file(configfile), "") or {} + local conf = format.parse_ini_file(fs.read_file(configfile), "") or {} local output = {} output.IPSEND = cfe({ value = conf.IPSEND or "", label="IP address for requests", descr="Use 0.0.0.0 for default address" }) @@ -84,13 +84,13 @@ function setconfig(config) if success then local file = fs.read_file(configfile) - file = format.update_configfile2(file,"","IPSEND",config.value.IPSEND.value) - file = format.update_configfile2(file,"","CACHESIZE",config.value.CACHESIZE.value) - file = format.update_configfile2(file,"","IP",config.value.IP.value) + file = format.update_ini_file(file,"","IPSEND",config.value.IPSEND.value) + file = format.update_ini_file(file,"","CACHESIZE",config.value.CACHESIZE.value) + file = format.update_ini_file(file,"","IP",config.value.IP.value) if config.value.FORWARDONLY.value then - file = format.update_configfile2(file,"","FORWARDONLY","true") + file = format.update_ini_file(file,"","FORWARDONLY","true") else - file = format.update_configfile2(file,"","FORWARDONLY","") + file = format.update_ini_file(file,"","FORWARDONLY","") end fs.write_file(configfile, file) else |