summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 = ""