Sha256: 80c41d26d377ba19d6b203e2b949fdd3a6f375f1c1d7f708ac5c66a8ff9df82d

Contents?: true

Size: 681 Bytes

Versions: 170

Compression:

Stored size: 681 Bytes

Contents

class Specinfra::Helper::DetectOs::Solaris < Specinfra::Helper::DetectOs
  def detect
    if ( uname = run_command('uname -sr').stdout) && uname =~ /SunOS/i
      if uname =~ /5.10/
        { :family => 'solaris', :release => 10 }
      elsif run_command('grep -q "Oracle Solaris 11" /etc/release').success?
        { :family => 'solaris', :release => 11 }
      elsif run_command('grep -q "OpenIndiana" /etc/release').success?
        { :family => 'solaris', :release => 11 }
      elsif run_command('grep -q SmartOS /etc/release').success?
        { :family => 'smartos', :release => nil }
      else
        { :family => 'solaris', :release => nil }
      end
    end
  end
end

Version data entries

170 entries across 170 versions & 2 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.90.1 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.90.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.89.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.88.2 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.88.1 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.88.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.87.2 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.87.1 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.87.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.86.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.85.1 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.85.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.84.1 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.84.0 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.83.4 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.83.3 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.83.2 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.83.1 lib/specinfra/helper/detect_os/solaris.rb
specinfra-2.83.0 lib/specinfra/helper/detect_os/solaris.rb