more consistent flag name

This commit is contained in:
Matthew Hooker 2017-10-12 16:38:18 -07:00
parent 106408f6be
commit 07b013945f
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
3 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ import (
// <nothing> // <nothing>
type StepCleanVMX struct { type StepCleanVMX struct {
RemoveEthernetInterfaces bool RemoveEthernetInterfaces bool
SkipVNCDisable bool VNCEnabled bool
} }
func (s StepCleanVMX) Run(state multistep.StateBag) multistep.StepAction { func (s StepCleanVMX) Run(state multistep.StateBag) multistep.StepAction {
@ -60,7 +60,7 @@ func (s StepCleanVMX) Run(state multistep.StateBag) multistep.StepAction {
vmxData[ide+"clientdevice"] = "TRUE" vmxData[ide+"clientdevice"] = "TRUE"
} }
if !s.SkipVNCDisable { if s.VNCEnabled {
ui.Message("Disabling VNC server...") ui.Message("Disabling VNC server...")
vmxData["remotedisplay.vnc.enabled"] = "FALSE" vmxData["remotedisplay.vnc.enabled"] = "FALSE"
} }

View File

@ -311,7 +311,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
}, },
&vmwcommon.StepCleanVMX{ &vmwcommon.StepCleanVMX{
RemoveEthernetInterfaces: b.config.VMXConfig.VMXRemoveEthernet, RemoveEthernetInterfaces: b.config.VMXConfig.VMXRemoveEthernet,
SkipVNCDisable: b.config.DisableVNC, VNCEnabled: !b.config.DisableVNC,
}, },
&StepUploadVMX{ &StepUploadVMX{
RemoteType: b.config.RemoteType, RemoteType: b.config.RemoteType,

View File

@ -123,7 +123,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
}, },
&vmwcommon.StepCleanVMX{ &vmwcommon.StepCleanVMX{
RemoveEthernetInterfaces: b.config.VMXConfig.VMXRemoveEthernet, RemoveEthernetInterfaces: b.config.VMXConfig.VMXRemoveEthernet,
SkipVNCDisable: b.config.DisableVNC, VNCEnabled: !b.config.DisableVNC,
}, },
} }