save initial command shell session output into session.info
git-svn-id: file:///home/svn/framework3/trunk@8829 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7cf8b4c43f
commit
f9267498e3
|
@ -216,6 +216,16 @@ class CommandShell
|
|||
# Execute any specified auto-run scripts for this session
|
||||
#
|
||||
def process_autoruns(datastore)
|
||||
# Read the initial output and mash it into a single line
|
||||
initial_output = shell_read(-1, 0.01)
|
||||
if (initial_output)
|
||||
initial_output.gsub!(/[\r\n\t]+/, ' ')
|
||||
initial_output.strip!
|
||||
|
||||
# Set the inital output to .info
|
||||
self.info = initial_output
|
||||
end
|
||||
|
||||
if (datastore['InitialAutoRunScript'] && datastore['InitialAutoRunScript'].empty? == false)
|
||||
args = datastore['InitialAutoRunScript'].split
|
||||
print_status("Session ID #{sid} (#{tunnel_to_s}) processing InitialAutoRunScript '#{datastore['InitialAutoRunScript']}'")
|
||||
|
|
Loading…
Reference in New Issue