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:
committed by
Daniel Theophanes
parent
e173e96a4e
commit
a37cd5efa8
@@ -17,6 +17,13 @@ func isUpstart() bool {
|
|||||||
if _, err := os.Stat("/sbin/upstart-udev-bridge"); err == nil {
|
if _, err := os.Stat("/sbin/upstart-udev-bridge"); err == nil {
|
||||||
return true
|
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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user