summaryrefslogtreecommitdiffstats
path: root/dhcp-controller.lua
diff options
context:
space:
mode:
authorAndreas Brodmann <andreas.brodmann@gmail.com>2007-11-19 15:56:10 +0000
committerAndreas Brodmann <andreas.brodmann@gmail.com>2007-11-19 15:56:10 +0000
commit3f7c448060b852c4fdde1d9698dbde5794d5c980 (patch)
tree81525498b1d2a9257d111bf42640aca31d5627c2 /dhcp-controller.lua
parente0d088c76ee0639a3979ffc810867a0221a3213d (diff)
downloadacf-dhcp-3f7c448060b852c4fdde1d9698dbde5794d5c980.tar.bz2
acf-dhcp-3f7c448060b852c4fdde1d9698dbde5794d5c980.tar.xz
/acf/dhcp: added global pre/post config generation input for proprietary config code by the user
git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@337 ab2d0c66-481e-0410-8bed-d214d4d58bed
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