summaryrefslogtreecommitdiffstats
path: root/openntpd-model.lua
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-01-10 14:52:47 +0000
committerMika Havela <mika.havela@gmail.com>2008-01-10 14:52:47 +0000
commit116d2438209781f88faaac07a48fb801852247e7 (patch)
tree9703faa647d038ad0f7e0675ca27d808871ea706 /openntpd-model.lua
parent705ca5ef914ce16ee099d7687c541934962ea067 (diff)
downloadacf-openntpd-116d2438209781f88faaac07a48fb801852247e7.tar.bz2
acf-openntpd-116d2438209781f88faaac07a48fb801852247e7.tar.xz
Changing tabnames and first page info
git-svn-id: svn://svn.alpinelinux.org/acf/openntpd/trunk@536 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'openntpd-model.lua')
-rw-r--r--openntpd-model.lua12
1 files changed, 5 insertions, 7 deletions
diff --git a/openntpd-model.lua b/openntpd-model.lua
index f74f941..4960534 100644
--- a/openntpd-model.lua
+++ b/openntpd-model.lua
@@ -40,7 +40,7 @@ local function file_info ( path )
filedetails["group"]=rawget((posix.getgroup(filedetails["gid"])),"name")
filedetails["atimelong"]=os.date("%c", filedetails["atime"])
filedetails["mtimelong"]=os.date("%c", filedetails["mtime"])
- filedetails["longname"]=path
+ filedetails["path"]=path
filedetails["name"]=basename(path)
if ( filedetails["size"] > 1073741824 ) then
@@ -69,9 +69,7 @@ local is_running = function( process )
local cmdoutput = string.gsub(cmd:read("*a"), "%s", "")
cmd:close()
if (cmdoutput ~= "") then
- statusreport = "Running"
- else
- statusreport = "Stopped"
+ statusreport = "Yes"
end
return statusreport
end
@@ -209,7 +207,7 @@ function get ()
end
config["version"] = string.match(get_version(), "^(%S*)" )
config["date"] = os.date()
- config["status"] = startstop
+ config["enabled"] = startstop
config["confd"],config["setstimeonstartup"] = get_confdopts("-s")
config["listenstate"] = server
config["timechanged"] = last_time_change()
@@ -235,8 +233,8 @@ function get_filecontent (self)
local configstatus = get()
local file = io.open( path )
local file_result = file:read("*a") or "unknown"
- file_content["filedetails"]=filedetails
- file_content["value"]=file_result
+ file_content["details"]=filedetails
+ file_content["content"]=file_result
file:close()
else
file_content = {value="", errtxt="File is missing, but will be created when you save your new settings",filedetails={longname=path, size="0", mtimelong=""}}