summaryrefslogtreecommitdiffstats
path: root/lvm2-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-20 00:32:59 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-20 00:32:59 +0000
commit09265504dcfe45d9683ffa7d3abc1570a55afb2a (patch)
tree4286f099842e103aaa27de342dd67ed8b0cf32a7 /lvm2-model.lua
parent4d09a094223123db27a5be12f38daedffa9d25ce (diff)
downloadacf-lvm2-09265504dcfe45d9683ffa7d3abc1570a55afb2a.tar.bz2
acf-lvm2-09265504dcfe45d9683ffa7d3abc1570a55afb2a.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 'lvm2-model.lua')
-rw-r--r--lvm2-model.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/lvm2-model.lua b/lvm2-model.lua
index ba63301..1676897 100644
--- a/lvm2-model.lua
+++ b/lvm2-model.lua
@@ -1,4 +1,4 @@
-module(..., package.seeall)
+local mymodule = {}
-- Load libraries
modelfunctions = require("modelfunctions")
@@ -15,19 +15,19 @@ local packagename = "lvm2"
-- ################################################################################
-- 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, "LVM Status")
end
-function getstatusdetails()
+function mymodule.getstatusdetails()
local status = {}
status.pvdisplay = cfe({ type="longtext", label="Physical Volumes" })
status.pvdisplay.value, status.pvdisplay.errtxt = modelfunctions.run_executable({"pvdisplay"})
@@ -37,3 +37,5 @@ function getstatusdetails()
return cfe({ type="group", value=status, label="LVM Status Details" })
end
+
+return mymodule