builder/vmware: look for license for WS9
This commit is contained in:
parent
04b8ff89a6
commit
bca05ddd5b
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue