diff options
-rw-r--r-- | openntpd-model.lua | 4 |
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 |