summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-10-03 12:42:13 +0000
committerTed Trask <ttrask01@yahoo.com>2008-10-03 12:42:13 +0000
commitfba47dc0eafc168ddc42e08850244b5603d02132 (patch)
tree8cf278e12b28f0f7698cdb51de4fe38037df9770
parent70cffc589d8a79c36f8c6847f89b926d761b3f7a (diff)
downloadacf-openntpd-fba47dc0eafc168ddc42e08850244b5603d02132.tar.bz2
acf-openntpd-fba47dc0eafc168ddc42e08850244b5603d02132.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/openntpd/trunk@1539 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--openntpd-model.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/openntpd-model.lua b/openntpd-model.lua
index 52bffd3..42f17e4 100644
--- a/openntpd-model.lua
+++ b/openntpd-model.lua
@@ -83,7 +83,7 @@ function read_config ()
end
end
- local opts = string.sub(format.parse_configfile2(fs.read_file(confdfile), "", "NTPD_OPTS"), 2, -2)
+ local opts = string.sub(format.parse_ini_file(fs.read_file(confdfile), "", "NTPD_OPTS"), 2, -2)
if format.opts_to_table(opts, "-s") then
config.setstimeonstartup.value = true
end
@@ -138,7 +138,7 @@ function update_config(config)
-- Finally, handle setstimeonstartup
local opts = {}
if config.value.setstimeonstartup.value then opts["-s"] = "" end
- fs.write_file(confdfile, format.update_configfile2(fs.read_file(confdfile) or "", "", "NTPD_OPTS", '"'..format.table_to_opts(opts)..'"'))
+ fs.write_file(confdfile, format.update_ini_file(fs.read_file(confdfile) or "", "", "NTPD_OPTS", '"'..format.table_to_opts(opts)..'"'))
else
config.errtxt = "Failed to save config"
end