diff options
Diffstat (limited to 'config/update_device.lua')
-rw-r--r-- | config/update_device.lua | 14 |
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) |