mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-23 08:21:43 -04:00
builder/vmware: look for license for WS9
This commit is contained in:
@@ -2,6 +2,7 @@ package vmware
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"os/exec"
|
||||
@@ -97,6 +98,16 @@ func (d *Workstation9LinuxDriver) Verify() error {
|
||||
return fmt.Errorf("Required application 'vmware-vdiskmanager' not found in path.")
|
||||
}
|
||||
|
||||
// Check to see if it APPEARS to be licensed.
|
||||
matches, err := filepath.Glob("/etc/vmware/license-*")
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error looking for VMware license: %s", err)
|
||||
}
|
||||
|
||||
if len(matches) == 0 {
|
||||
return errors.New("Workstation does not appear to be licensed. Please license it.")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user