Change the command used for os detection from uname to freebsd-version

This commit is contained in:
Kota Kanbe
2017-02-15 14:34:53 +09:00
parent df2c9697ef
commit 9986c4a6f3
3 changed files with 3 additions and 3 deletions

View File

@@ -395,7 +395,7 @@ web/app server in the same configuration under the load balancer
| RHEL | 5, 6, 7|
| CentOS | 5, 6, 7|
| Amazon Linux| All|
| FreeBSD | 10|
| FreeBSD | 10, 11|
| Raspbian | Wheezy, Jessie |
----

View File

@@ -396,7 +396,7 @@ If there is a staging environment with the same configuration as the production
| RHEL | 5, 6, 7|
| CentOS | 5, 6, 7|
| Amazon Linux| All|
| FreeBSD | 10|
| FreeBSD | 10, 11|
| Raspbian | Wheezy, Jessie |
----

View File

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