Sha256: 168842be758907cf1ba9e1bef49123f67a0207ed15fa7d6ba5346c8e59143693

Contents?: true

Size: 463 Bytes

Versions: 123

Compression:

Stored size: 463 Bytes

Contents

class Specinfra::Helper::DetectOs::Suse < Specinfra::Helper::DetectOs
  def 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

123 entries across 123 versions & 3 rubygems

Version Path
specinfra-rb19-2.44.7 lib/specinfra/helper/detect_os/suse.rb
specinfra-cisco-2.41.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.54.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.54.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.54.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.53.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.53.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.52.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.51.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.51.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.51.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.50.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.50.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.50.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.50.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.50.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.49.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.48.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.47.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.47.0 lib/specinfra/helper/detect_os/suse.rb