summaryrefslogtreecommitdiffstats
path: root/ipsec-tools-controller.lua
diff options
context:
space:
mode:
authorNatanael Copa <natanael.copa@gmail.com>2008-03-27 13:54:16 +0000
committerNatanael Copa <natanael.copa@gmail.com>2008-03-27 13:54:16 +0000
commit3142bc1bcec3ab55677cdb2cdadf5cf23d15f4b4 (patch)
tree52ef2dc6343f07199d7c8b03cafdeae572a67ef0 /ipsec-tools-controller.lua
downloadacf-ipsec-tools-3142bc1bcec3ab55677cdb2cdadf5cf23d15f4b4.tar.bz2
acf-ipsec-tools-3142bc1bcec3ab55677cdb2cdadf5cf23d15f4b4.tar.xz
added ipsec-tools
git-svn-id: svn://svn.alpinelinux.org/acf/ipsec-tools/trunk@845 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'ipsec-tools-controller.lua')
-rw-r--r--ipsec-tools-controller.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/ipsec-tools-controller.lua b/ipsec-tools-controller.lua
new file mode 100644
index 0000000..2a31dd6
--- /dev/null
+++ b/ipsec-tools-controller.lua
@@ -0,0 +1,25 @@
+module(..., package.seeall)
+
+-- This is the object/text used when we want to add a new record
+
+require("format")
+
+local list_redir = function (self)
+ self.conf.action = "status"
+ self.conf.type = "redir"
+ error (self.conf)
+end
+
+mvc = {}
+mvc.on_load = function(self, parent)
+ if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then
+ self.worker[self.conf.action] = list_redir(self)
+ end
+end
+
+-- ################################################################################
+-- PUBLIC FUNCTIONS
+function status(self)
+ return { status=self.model.getstatus() }
+end
+