summaryrefslogtreecommitdiffstats
path: root/rc-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-17 19:07:53 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-17 19:07:53 +0000
commit2ece009273252437281c8cc0b84ba2ec49e5d07c (patch)
tree1c082ee4891a4717f2fea09f0df4a8946d9fdb41 /rc-controller.lua
parent0537a242f9709271454252e7897a7709144a3b02 (diff)
downloadacf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.tar.bz2
acf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.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 'rc-controller.lua')
-rw-r--r--rc-controller.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/rc-controller.lua b/rc-controller.lua
index 63d9a94..4ec40b9 100644
--- a/rc-controller.lua
+++ b/rc-controller.lua
@@ -1,17 +1,19 @@
-- the rc controller
-module (..., package.seeall)
+local mymodule = {}
-default_action = "status"
+mymodule.default_action = "status"
-status = function(self)
+mymodule.status = function(self)
return self.model.status()
end
-edit = function(self)
+mymodule.edit = function(self)
return self.handle_form(self, self.model.read_runlevels, self.model.update_runlevels, self.clientdata, "Save", "Edit Service Runlevels", "Runlevels Updated")
end
-startstop = function(self)
+mymodule.startstop = function(self)
return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
end
+
+return mymodule