mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
1 parent
5ee0e6a4a4
commit
297350ece9
1 file changed
+10
-2
@@ -139,10 +139,12 @@ module HEMHook
|
||||
command.concat(" #{params}")
|
||||
end
|
||||
|
||||
_timeout = timeout
|
||||
|
||||
if !remote?
|
||||
LocalCommand.run(command, nil, stdin, nil)
|
||||
LocalCommand.run(command, nil, stdin, _timeout)
|
||||
elsif !host.empty?
|
||||
SSHCommand.run(command, host, nil, stdin, nil)
|
||||
SSHCommand.run(command, host, nil, stdin, _timeout)
|
||||
else
|
||||
return -1
|
||||
end
|
||||
@@ -176,6 +178,12 @@ module HEMHook
|
||||
astdin.zero?
|
||||
end
|
||||
|
||||
def timeout
|
||||
return self['TEMPLATE/TIMEOUT'].to_i if !self['TEMPLATE/TIMEOUT'].nil?
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
# Generates a key for a given hook
|
||||
def key
|
||||
begin
|
||||
|
||||
Reference in new issue
Block a user