summaryrefslogtreecommitdiffstats
path: root/config/update_device.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2011-10-10 19:34:59 +0000
committerTed Trask <ttrask01@yahoo.com>2011-10-10 19:34:59 +0000
commit1d895ace660869053830ed33302e0708efb6065e (patch)
tree0ed844a6a408042ec0c6f4a11726db7a7915881b /config/update_device.lua
parentb802504e41cccda64b8f903973d01897bbec7451 (diff)
downloadacf-provisioning-1d895ace660869053830ed33302e0708efb6065e.tar.bz2
acf-provisioning-1d895ace660869053830ed33302e0708efb6065e.tar.xz
Added in configuration files / scripts and cgi-bin scripts.
Diffstat (limited to 'config/update_device.lua')
-rw-r--r--config/update_device.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/update_device.lua b/config/update_device.lua
new file mode 100644
index 0000000..90f5340
--- /dev/null
+++ b/config/update_device.lua
@@ -0,0 +1,14 @@
+-- This is the script run after editing a device - the label, classes
+local functions, device, olddevice, params, oldparams = ...
+
+APP.logevent("got to update_device script")
+
+-- We'll handle the changing of the device by handling the resulting changing of the params
+local env = {}
+setmetatable (env, {__index = _G})
+-- loadfile loads into the global environment
+-- so we set env 0, not env 1
+setfenv (0, env)
+local f = loadfile("/etc/provisioning/update_device_params.lua")
+if (f) then f(functions, params, oldparams) end
+setfenv (0, _G)