diff options
Diffstat (limited to 'src/modules/exec.lua')
-rw-r--r-- | src/modules/exec.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/exec.lua b/src/modules/exec.lua index 09a6335..61eb34c 100644 --- a/src/modules/exec.lua +++ b/src/modules/exec.lua @@ -39,10 +39,11 @@ exec.defaults = { script = "exec.sh" } exec.next_id = 0 -- create new instance of exec module class -function exec:new(config) +function exec:new(config, runtype) local inst = {} inst.class = self.properties.name inst.config = config + inst.config.runtype = runtype if(config.name == nil or config.name == "") then inst.name = self.properties.name .. self.next_id self.next_id = self.next_id + 1 @@ -84,10 +85,12 @@ function exec:new(config) end self.in_buffer = self.in_buffer .. buffer - self.in_buffer = dispatch_table:dispatch(self.in_buffer) - - -- TODO: part of expected response handling - command_queue:command_completed() + if(inst.config.runtype == defines.IN_MODULE) then + self.in_buffer = dispatch_table:dispatch(self.in_buffer) + else + -- TODO: part of expected response handling + command_queue:command_completed() + end return defines.OK end |