summaryrefslogtreecommitdiffstats
path: root/openntpd-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'openntpd-model.lua')
-rw-r--r--openntpd-model.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/openntpd-model.lua b/openntpd-model.lua
index f5607f5..5aec085 100644
--- a/openntpd-model.lua
+++ b/openntpd-model.lua
@@ -16,6 +16,8 @@ local processname = "ntpd"
local function last_time_change()
local cmdoutput = "(Have no data on updates)"
+ -- This works for busybox syslog, which always logs to /var/log/messages
+ -- FIXME to work with other syslog options
local mess = fs.read_file_as_array("/var/log/messages")
for i=table.maxn(mess),1,-1 do
if string.find(mess[i], "ntpd.*adjusting") then
@@ -162,4 +164,11 @@ function mymodule.update_filedetails(self, filedetails)
return modelfunctions.setfiledetails(self, filedetails, {configfile})
end
+function mymodule.get_logfile(self, clientdata)
+ local retval = cfe({ type="group", value={}, label="Log File Configuration" })
+ retval.value.facility = cfe({value="daemon", label="Syslog Facility"})
+ retval.value.grep = cfe({ value="ntpd", label="Grep" })
+ return retval
+end
+
return mymodule