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.15.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.15.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.14.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.14.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.14.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.14.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.14.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.13.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.13.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.12.7 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.12.6 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.12.5 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.12.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.12.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.12.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.12.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.11.10 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.11.9 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.11.8 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.11.7 lib/specinfra/helper/detect_os/suse.rb