1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Only add VNC password and listen port if present

Previous to this commit, the VNC password and listen address was defined
in the creation of a libvirt domain, whether a listen address or
password was specified or not.  This commit, only adds the parameters if
they're specified, and not empty
This commit is contained in:
Carl Caum 2012-08-03 12:37:39 -07:00
parent 530122de30
commit 831be2d4f7

View file

@ -45,7 +45,7 @@
<target port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='<%= display[:type] %>' port='<%= display[:port] %>' autoport='yes' listen='<%= display[:listen] %>' passwd='<%=display[:password] %>'/>
<graphics type='<%= display[:type] %>' port='<%= display[:port] %>' autoport='yes' <% if display[:listen] and !(display[:listen].empty?) %> listen='<%= display[:listen] %>'<% end %> <% if display[:password] and !(display[:password].empty?) %>passwd='<%=display[:password] %>'<% end %> />
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>