[DRE-commits] [vagrant-libvirt] 47/163: automatically set autoport to properly support legacy behavior
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Apr 24 13:57:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to annotated tag 0.0.26
in repository vagrant-libvirt.
commit 17d98506848f88a3d3e623c705dcb93f0df693c5
Author: Wolfgang Richter <wolf at cs.cmu.edu>
Date: Sun Sep 28 11:00:39 2014 -0400
automatically set autoport to properly support legacy behavior
---
lib/vagrant-libvirt/action/create_domain.rb | 1 +
lib/vagrant-libvirt/config.rb | 4 ++++
lib/vagrant-libvirt/templates/domain.xml.erb | 2 +-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/vagrant-libvirt/action/create_domain.rb b/lib/vagrant-libvirt/action/create_domain.rb
index 42a0ef5..07ba268 100644
--- a/lib/vagrant-libvirt/action/create_domain.rb
+++ b/lib/vagrant-libvirt/action/create_domain.rb
@@ -36,6 +36,7 @@ module VagrantPlugins
@cmd_line = config.cmd_line
@initrd = config.initrd
@graphics_type = config.graphics_type
+ @graphics_autoport = config.graphics_autoport
@graphics_port = config.graphics_port
@graphics_ip = config.graphics_ip
@video_type = config.video_type
diff --git a/lib/vagrant-libvirt/config.rb b/lib/vagrant-libvirt/config.rb
index 97ce60b..366ec11 100644
--- a/lib/vagrant-libvirt/config.rb
+++ b/lib/vagrant-libvirt/config.rb
@@ -62,6 +62,7 @@ module VagrantPlugins
attr_accessor :cmd_line
attr_accessor :initrd
attr_accessor :graphics_type
+ attr_accessor :graphics_autoport
attr_accessor :graphics_port
attr_accessor :graphics_ip
attr_accessor :video_type
@@ -95,6 +96,7 @@ module VagrantPlugins
@initrd = UNSET_VALUE
@cmd_line = UNSET_VALUE
@graphics_type = UNSET_VALUE
+ @graphics_autoport = UNSET_VALUE
@graphics_port = UNSET_VALUE
@graphics_ip = UNSET_VALUE
@video_type = UNSET_VALUE
@@ -217,6 +219,8 @@ module VagrantPlugins
@cmd_line = '' if @cmd_line == UNSET_VALUE
@initrd = '' if @initrd == UNSET_VALUE
@graphics_type = 'vnc' if @graphics_type == UNSET_VALUE
+ @graphics_autoport = 'yes' if @graphics_port == UNSET_VALUE
+ @graphics_autoport = 'no' if @graphics_port != UNSET_VALUE
@graphics_port = 5900 if @graphics_port == UNSET_VALUE
@graphics_ip = '127.0.0.1' if @graphics_ip == UNSET_VALUE
@video_type = 'cirrus' if @video_type == UNSET_VALUE
diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb
index f8fdc2e..d8af236 100644
--- a/lib/vagrant-libvirt/templates/domain.xml.erb
+++ b/lib/vagrant-libvirt/templates/domain.xml.erb
@@ -49,7 +49,7 @@
<target port='0'/>
</console>
<input type='mouse' bus='ps2'/>
- <graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='no' listen='<%= @graphics_ip %>' keymap='en-us'/>
+ <graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='en-us'/>
<video>
<model type='<%= @video_type %>' vram='<%= @video_vram %>' heads='1'/>
</video>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-libvirt.git
More information about the Pkg-ruby-extras-commits
mailing list