Merge branch 'master' into support-fog-timeout-override

This commit is contained in:
Darragh Bailey 2022-02-21 16:17:17 +00:00 committed by GitHub
commit 619bf4da1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 10 deletions

View File

@ -345,9 +345,9 @@ module VagrantPlugins
# Use Qemu agent to get ip address
@qemu_use_agent = UNSET_VALUE
@serials = []
@fog_timeout = UNSET_VALUE
@serials = UNSET_VALUE
@fog_timeout = UNSET_VALUE
end
def boot(device)
@ -707,6 +707,8 @@ module VagrantPlugins
end
def serial(options={})
@serials = [] if @serials == UNSET_VALUE
options = {
:type => "pty",
:source => nil,
@ -971,8 +973,8 @@ module VagrantPlugins
@qemu_use_agent = false if @qemu_use_agent == UNSET_VALUE
@serials = [{:type => 'pty', :source => nil}] if @serials == []
@serials = [{:type => 'pty', :source => nil}] if @serials == UNSET_VALUE
@fog_timeout = DEFAULT_FOG_TIMEOUT if @fog_timeout == UNSET_VALUE
end
@ -1073,9 +1075,11 @@ module VagrantPlugins
c.merge!(other.qemu_env) if other.qemu_env != UNSET_VALUE
result.qemu_env = c
s = serials.dup
s += other.serials
result.serials = s
if serials != UNSET_VALUE
s = serials.dup
s += other.serials
result.serials = s
end
end
end

View File

@ -163,14 +163,16 @@
<%- end -%>
<target port='<%= port %>'/>
</serial>
<%- end -%>
<%- end -%>
<%- unless @serials.empty? -%>
<%- console_log = @serials.first -%>
<console type='<%= console_log[:type] %>'>
<%- unless console_log[:source].nil? -%>
<source path='<%= console_log[:source][:path] %>'/>
<%- end -%>
<%- end -%>
<target port='0'/>
</console>
<%- end -%>
<%- @channels.each do |channel| -%>
<channel type='<%= channel[:type] %>' >
<%-if channel[:source_mode] or channel[:source_path] -%>