summaryrefslogtreecommitdiffstats
path: root/dhcp-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'dhcp-controller.lua')
-rw-r--r--dhcp-controller.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/dhcp-controller.lua b/dhcp-controller.lua
index d0a046f..c6d2c83 100644
--- a/dhcp-controller.lua
+++ b/dhcp-controller.lua
@@ -144,6 +144,28 @@ editnet = function ( self )
return ( cfe({ option = option, value = net, errcode = { msg="", fields={} }}) )
end
+editspc = function ( self )
+ if not self.clientdata.cmd then
+ list_redir( self )
+ end
+
+ local option = { script = ENV["SCRIPT_NAME"],
+ prefix = self.conf.prefix,
+ controller = self.conf.controller,
+ action = self.conf.action,
+ extra = ""
+ }
+
+ if self.clientdata.cmd == "update" then
+ tmp = self.clientdata
+ value = self.model.advglobal_update( tmp.preconfig, tmp.postconfig )
+ return ( cfe({ option = option, value = value, errcode = { msg="", fields={} }}) )
+ end
+
+ value = self.model.advglobal_read()
+ return ( cfe({ option = option, value = value, errcode = { msg="", fields={} }}) )
+end
+
createnet = function ( self )
if not self.clientdata.cmd then