Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch request for FreeBSD #312

Closed
sheo0147 opened this issue Feb 6, 2017 · 1 comment
Closed

patch request for FreeBSD #312

sheo0147 opened this issue Feb 6, 2017 · 1 comment
Labels

Comments

@sheo0147
Copy link

sheo0147 commented Feb 6, 2017

Apply following patch.

$ diff -c freebsd.go.orig freebsd.go
*** freebsd.go.orig    Mon Feb  6 14:38:18 2017
--- freebsd.go    Mon Feb  6 14:39:37 2017
***************
*** 48,54 ****
  
      if r := exec(c, "uname", noSudo); r.isSuccess() {
          if strings.Contains(r.Stdout, "FreeBSD") == true {
!             if b := exec(c, "uname -r", noSudo); b.isSuccess() {
                  rel := strings.TrimSpace(b.Stdout)
                  bsd.setDistro("FreeBSD", rel)
                  return true, bsd
--- 48,54 ----
  
      if r := exec(c, "uname", noSudo); r.isSuccess() {
          if strings.Contains(r.Stdout, "FreeBSD") == true {
!             if b := exec(c, "freebsd-version", noSudo); b.isSuccess() {
                  rel := strings.TrimSpace(b.Stdout)
                  bsd.setDistro("FreeBSD", rel)
                  return true, bsd

There are 2 version information on FreeBSD. One is kernel version, and other is system version. FreeBSD uname outputs kernel version only. You can get FreeBSD system version by freebsd-version command.
So vuls need to run freebsd-version insted of uname -r.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants