From 1d895ace660869053830ed33302e0708efb6065e Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 10 Oct 2011 19:34:59 +0000 Subject: Added in configuration files / scripts and cgi-bin scripts. --- config/update_device.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 config/update_device.lua (limited to 'config/update_device.lua') 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) -- cgit v1.2.3