From 7b5422d3943e6243d3b48da4f24cc024c01e49bb Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Thu, 24 Jan 2008 16:48:28 +0000 Subject: Fixed so that acf doesnt brake if the confi-file is missing or is empty git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@641 ab2d0c66-481e-0410-8bed-d214d4d58bed --- syslog-controller.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'syslog-controller.lua') diff --git a/syslog-controller.lua b/syslog-controller.lua index 288ae7b..77cd0ab 100644 --- a/syslog-controller.lua +++ b/syslog-controller.lua @@ -1,9 +1,17 @@ module(..., package.seeall) -mvc = {} -function mvc.on_load(self) +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 function status(self) return { status=self.model.getstatus() } -- cgit v1.2.3