Remove init check for busybox-based systems

This commit is contained in:
Frank Denis 2018-03-02 09:29:46 +01:00
parent 3910873bf2
commit 4e7631bfcd
2 changed files with 2 additions and 11 deletions

View file

@ -8,9 +8,7 @@ import (
"errors"
"fmt"
"os"
"os/exec"
"os/signal"
"strings"
"text/template"
"time"
)
@ -19,13 +17,6 @@ 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
}