Make a basic executor that can be shared and fix some fingerprinting/tests

This commit is contained in:
Alex Dadgar
2015-11-03 12:47:48 -08:00
parent 6cf8eeb216
commit 13ea9bc9ff
5 changed files with 125 additions and 22 deletions

View File

@@ -38,8 +38,8 @@ func NewJavaDriver(ctx *DriverContext) Driver {
func (d *JavaDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error) {
// Only enable if we are root when running on non-windows systems.
if runtime.GOOS != "windows" && syscall.Geteuid() != 0 {
d.logger.Printf("[DEBUG] driver.java: must run as root user, disabling")
if runtime.GOOS == "linux" && syscall.Geteuid() != 0 {
d.logger.Printf("[DEBUG] driver.java: must run as root user on linux, disabling")
return false, nil
}