Sha256: 4b75aae4f44d6ec2b51aad4ac55b6b27ced9edec8ee65586d98ac496ee086eb3

Contents?: true

Size: 468 Bytes

Versions: 127

Compression:

Stored size: 468 Bytes

Contents

class Specinfra::Helper::DetectOs::Suse < Specinfra::Helper::DetectOs
  def self.detect
    if run_command('ls /etc/SuSE-release').success?
      line = run_command('cat /etc/SuSE-release').stdout
      if line =~ /SUSE Linux Enterprise Server (\d+)/
        release = $1
        family = 'suse'
      elsif line =~ /openSUSE (\d+\.\d+|\d+)/
        release = $1
        family = 'opensuse'
      end
      { :family => family, :release => release }
    end
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
specinfra-2.4.5 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.4.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.4.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.4.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.4.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.4.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.3.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.3.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.3.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.2.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.2.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.2.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.2.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.2.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.1.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.1.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.1 lib/specinfra/helper/detect_os/suse.rb