summaryrefslogtreecommitdiffstats
path: root/gross-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-19 23:53:34 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-19 23:53:34 +0000
commitd7fcdfbd2d4a6bf4cd566ec4b60c0df6fd0b4567 (patch)
tree48489ddac492c6cc38ded8e0cf854e017b758880 /gross-model.lua
parent9cda8a61505a5f0bd22eddbe3831049734c8f7c3 (diff)
downloadacf-gross-d7fcdfbd2d4a6bf4cd566ec4b60c0df6fd0b4567.tar.bz2
acf-gross-d7fcdfbd2d4a6bf4cd566ec4b60c0df6fd0b4567.tar.xz
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition. This was also helpful in revealing places where the code relied on the global environment.
Diffstat (limited to 'gross-model.lua')
-rw-r--r--gross-model.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/gross-model.lua b/gross-model.lua
index cd9cf4c..94a2685 100644
--- a/gross-model.lua
+++ b/gross-model.lua
@@ -1,4 +1,4 @@
-module(..., package.seeall)
+local mymodule = {}
-- Load libraries
modelfunctions = require("modelfunctions")
@@ -18,26 +18,28 @@ local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
-- ################################################################################
-- PUBLIC FUNCTIONS
-function get_startstop(self, clientdata)
+function mymodule.get_startstop(self, clientdata)
return modelfunctions.get_startstop(processname)
end
-function startstop_service(self, startstop, action)
+function mymodule.startstop_service(self, startstop, action)
return modelfunctions.startstop_service(startstop, action)
end
-function getstatus()
+function mymodule.getstatus()
return modelfunctions.getstatus(processname, packagename, "Gross Status")
end
-function getstatusdetails()
+function mymodule.getstatusdetails()
return cfe({ type="longtext", value="", label="Gross Status Details" })
end
-function get_filedetails()
+function mymodule.get_filedetails()
return modelfunctions.getfiledetails(configfile)
end
-function update_filedetails(self, filedetails)
+function mymodule.update_filedetails(self, filedetails)
return modelfunctions.setfiledetails(self, filedetails, {configfile})
end
+
+return mymodule