From e7aa9b409c0203f576030b4efc0014467f297d2f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 11 Jun 2013 21:08:45 -0700 Subject: [PATCH] builder/virtualbox: add boot_command --- builder/virtualbox/builder.go | 19 ++++++++++--------- builder/virtualbox/builder_test.go | 1 - builder/virtualbox/step_create_disk.go | 2 +- builder/virtualbox/step_run.go | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/builder/virtualbox/builder.go b/builder/virtualbox/builder.go index ba813b156..36e08f187 100644 --- a/builder/virtualbox/builder.go +++ b/builder/virtualbox/builder.go @@ -23,15 +23,16 @@ type Builder struct { } type config struct { - BootWait time.Duration `` - GuestOSType string `mapstructure:"guest_os_type"` - ISOMD5 string `mapstructure:"iso_md5"` - ISOUrl string `mapstructure:"iso_url"` - OutputDir string `mapstructure:"output_directory"` - SSHHostPortMin uint `mapstructure:"ssh_host_port_min"` - SSHHostPortMax uint `mapstructure:"ssh_host_port_max"` - SSHPort uint `mapstructure:"ssh_port"` - VMName string `mapstructure:"vm_name"` + BootCommand []string `mapstructure:"boot_command"` + BootWait time.Duration `` + GuestOSType string `mapstructure:"guest_os_type"` + ISOMD5 string `mapstructure:"iso_md5"` + ISOUrl string `mapstructure:"iso_url"` + OutputDir string `mapstructure:"output_directory"` + SSHHostPortMin uint `mapstructure:"ssh_host_port_min"` + SSHHostPortMax uint `mapstructure:"ssh_host_port_max"` + SSHPort uint `mapstructure:"ssh_port"` + VMName string `mapstructure:"vm_name"` RawBootWait string `mapstructure:"boot_wait"` } diff --git a/builder/virtualbox/builder_test.go b/builder/virtualbox/builder_test.go index dbf6ccc2d..5de684be9 100644 --- a/builder/virtualbox/builder_test.go +++ b/builder/virtualbox/builder_test.go @@ -169,4 +169,3 @@ func TestBuilderPrepare_SSHHostPort(t *testing.T) { t.Fatalf("should not have error: %s", err) } } - diff --git a/builder/virtualbox/step_create_disk.go b/builder/virtualbox/step_create_disk.go index 00c395a12..a197d1816 100644 --- a/builder/virtualbox/step_create_disk.go +++ b/builder/virtualbox/step_create_disk.go @@ -10,7 +10,7 @@ import ( // This step creates the virtual disk that will be used as the // hard drive for the virtual machine. -type stepCreateDisk struct {} +type stepCreateDisk struct{} func (s *stepCreateDisk) Run(state map[string]interface{}) multistep.StepAction { config := state["config"].(*config) diff --git a/builder/virtualbox/step_run.go b/builder/virtualbox/step_run.go index 673e853f4..18a918f0f 100644 --- a/builder/virtualbox/step_run.go +++ b/builder/virtualbox/step_run.go @@ -12,7 +12,7 @@ import ( // Uses: // // Produces: -type stepRun struct{ +type stepRun struct { vmName string }