-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from chef/ssd/family-ohai-sync
Bring train platform data more in line with ohai's platform data
- Loading branch information
Showing
6 changed files
with
136 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# encoding: utf-8 | ||
# author: Dominik Richter | ||
# author: Christoph Hartmann | ||
# | ||
# This is heavily based on: | ||
# | ||
# OHAI https://github.com/chef/ohai | ||
# by Adam Jacob, Chef Software Inc | ||
# | ||
module Train::Extras | ||
module Uname | ||
def uname_s | ||
@uname_s ||= backend.run_command('uname -s').stdout | ||
end | ||
|
||
def uname_r | ||
@uname_r ||= begin | ||
res = backend.run_command('uname -r').stdout | ||
res.strip! unless res.nil? | ||
res | ||
end | ||
end | ||
|
||
def uname_m | ||
@uname_m ||= backend.run_command('uname -m').stdout.chomp | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters