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-2.46.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.45.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.8 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.7 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.6 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.5 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.4 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.44.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.11 lib/specinfra/helper/detect_os/suse.rb
specinfra-cisco-2.40.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.10 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.9 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.8 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.7 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.6 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.5 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.4 lib/specinfra/helper/detect_os/suse.rb