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.21.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.21.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.20.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.20.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.20.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.19.6 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.19.5 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.19.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.19.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.19.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.19.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.19.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.18.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.18.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.18.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.18.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.17.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.17.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.16.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.15.2 lib/specinfra/helper/detect_os/suse.rb