Fix FreeBSD detection

This commit is contained in:
kota kanbe
2017-08-16 11:54:19 +09:00
parent 886a21c633
commit 477e12d5cf

View File

@@ -54,7 +54,7 @@ func detectFreebsd(c config.ServerInfo) (itsMe bool, bsd osTypeInterface) {
c.Distro = config.Distro{Family: config.FreeBSD}
if r := exec(c, "uname", noSudo); r.isSuccess() {
if strings.Contains(r.Stdout, config.FreeBSD) == true {
if strings.Contains(strings.ToLower(r.Stdout), config.FreeBSD) == true {
if b := exec(c, "freebsd-version", noSudo); b.isSuccess() {
rel := strings.TrimSpace(b.Stdout)
bsd.setDistro(config.FreeBSD, rel)