Update linux upstart detection to support RHEL6 (#92)

* Update linux upstart detection to support RHEL6

I've added additional detection logic to the isUpstart function, that should validate the existence of upstart on a RHEL 6 system.

* Remove debug message
This commit is contained in:
SteelPhase
2017-05-10 08:15:22 -04:00
committed by Daniel Theophanes
parent e173e96a4e
commit a37cd5efa8
+7
View File
@@ -17,6 +17,13 @@ func isUpstart() bool {
if _, err := os.Stat("/sbin/upstart-udev-bridge"); err == nil {
return true
}
if _, err := os.Stat("/sbin/init"); err == nil {
if out, err := exec.Command("/sbin/init", "--version").Output(); err == nil {
if strings.Contains(string(out),"init (upstart") {
return true
}
}
}
return false
}