summaryrefslogtreecommitdiffstats
path: root/config/update_device.lua
blob: 9823e951ab968977cfcc351424184d2b1518caf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- This is the script run after editing a device - the label, classes
local self, device, olddevice, params, oldparams = ...

--self.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(self, params, oldparams) end
setfenv (0, _G)