Added the paths suggested by @phekmat and @SwampDragons for VMware Fusion... Although parser for the new mapper format is likely to be needed still.

This commit is contained in:
Ali Rizvi-Santiago 2017-10-16 11:59:10 -05:00
parent 8cc0776f3a
commit 069d00f70b
2 changed files with 29 additions and 1 deletions

View File

@ -141,10 +141,21 @@ func (d *Fusion5Driver) Verify() error {
return err return err
} }
// default paths libpath := filepath.Join("Library", "Preferences", "VMware Fusion")
d.VmwareDriver.DhcpLeasesPath = func(device string) string { d.VmwareDriver.DhcpLeasesPath = func(device string) string {
return "/var/db/vmware/vmnet-dhcpd-" + device + ".leases" return "/var/db/vmware/vmnet-dhcpd-" + device + ".leases"
} }
d.VmwareDriver.DhcpConfPath = func(device string) string {
return filepath.Join(libpath, device, "dhcpd.conf")
}
d.VmwareDriver.VmnetnatConfPath = func(device string) string {
return filepath.Join(libpath, device, "nat.conf")
}
d.VmwareDriver.NetmapConfPath = func() string {
// FIXME: Suggested by @phekmat. This will need another parser to be implemented.
return filepath.Join(libpath, "networking")
}
return nil return nil
} }

View File

@ -66,6 +66,23 @@ func (d *Fusion6Driver) Verify() error {
} }
log.Printf("Detected VMware version: %s", matches[1]) log.Printf("Detected VMware version: %s", matches[1])
libpath := filepath.Join("Library", "Preferences", "VMware Fusion")
d.VmwareDriver.DhcpLeasesPath = func(device string) string {
return "/var/db/vmware/vmnet-dhcpd-" + device + ".leases"
}
d.VmwareDriver.DhcpConfPath = func(device string) string {
return filepath.Join(libpath, device, "dhcpd.conf")
}
d.VmwareDriver.VmnetnatConfPath = func(device string) string {
return filepath.Join(libpath, device, "nat.conf")
}
d.VmwareDriver.NetmapConfPath = func() string {
// FIXME: Suggested by @phekmat. This will need another parser to be implemented.
return filepath.Join(libpath, "networking")
}
return compareVersions(matches[1], VMWARE_FUSION_VERSION, "Fusion Professional") return compareVersions(matches[1], VMWARE_FUSION_VERSION, "Fusion Professional")
} }