Skip to content

Commit

Permalink
fixing a minor bug ('Sun' in RHEL6u5 uname -a output was throwing us …
Browse files Browse the repository at this point in the history
…off), adding TODO about proper future handling
  • Loading branch information
chorankates-sfdc committed Dec 6, 2013
1 parent afa6ceb commit a4e8362
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/rouster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,19 @@ def os_type
return @ostype
end

# TODO switch to file based detection
# Ubuntu - /etc/os-release
# Solaris - /etc/release
# RHEL/CentOS - /etc/redhat-release
# OSX - ?

res = nil
uname = self.run('uname -a')

case uname
when /Darwin/i
res = :osx
when /Sun|Solaris/i
when /SunOS|Solaris/i
res =:solaris
when /Ubuntu/i
res = :ubuntu
Expand Down

0 comments on commit a4e8362

Please sign in to comment.