summaryrefslogtreecommitdiffstats
path: root/dhcp-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-04-28 15:24:27 +0000
committerTed Trask <ttrask01@yahoo.com>2008-04-28 15:24:27 +0000
commit9aa99832f22823332fd12ad0ceb60626d725764c (patch)
tree4c1ed2ff54fd03acf2cc90215875928a19f4f27a /dhcp-controller.lua
parentc1f39235bf596b8b96ca35d0c56f86d1c9692ccb (diff)
downloadacf-dhcp-9aa99832f22823332fd12ad0ceb60626d725764c.tar.bz2
acf-dhcp-9aa99832f22823332fd12ad0ceb60626d725764c.tar.xz
Changed error redir code to use redirect function instead
git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@1051 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'dhcp-controller.lua')
-rw-r--r--dhcp-controller.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/dhcp-controller.lua b/dhcp-controller.lua
index 6ba93ce..d60821c 100644
--- a/dhcp-controller.lua
+++ b/dhcp-controller.lua
@@ -11,9 +11,7 @@ dep = function( self )
-- make sure nobody accidentally calls this action
if msg == nil then
- self.conf.type = "redir"
- self.conf.action = "home"
- error (self.conf)
+ redirect(self, "home")
end
-- go ahead
@@ -176,9 +174,7 @@ createnet = function ( self )
tmp.netmask, tmp.leaserangestart, tmp.leaserangeend, tmp.wpad, "", tmp.unknownclients, "", "", "" )
errcode, net = self.model.subnet_create( net )
if #errcode.msg == 0 then
- self.conf.type = "redir"
- self.conf.action = "home"
- error (self.conf)
+ redirect(self, "home")
else
return ( cfe({ option = option, value = net, errcode = errcode }) )
end
@@ -202,9 +198,7 @@ home = function ( self )
-- dependancy check for neccessary libs/packages et al.
msg = self.model.dep_check()
if msg ~= nil then
- self.conf.type = "redir"
- self.conf.action = "dep"
- error(self.conf)
+ redirect(self, "dep")
end
local srvctrl = ""