Sha256: da7d3a88252e2fde29bb7b01faa3502a2e2db4b1c1e2e0cb3ab24160c10764e8

Contents?: true

Size: 341 Bytes

Versions: 19

Compression:

Stored size: 341 Bytes

Contents

module Keystone::Os
  class Linux < Unix
    def self.get
      Dir.glob("/etc/*{-release,_version}").each do |file|
        content = File.open(file).read
        if content =~ /CentOS release (\d*)/
          os = Centos.new
          os.version = $1.to_i
          return os
        end
      end
      return Linux.new
    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
kanamei-kanamei-keystone-0.0.12 lib/keystone/os/linux.rb
kanamei-kanamei-keystone-0.0.13 lib/keystone/os/linux.rb
kanamei-keystone-0.0.11 lib/keystone/os/linux.rb
kanamei-keystone-0.0.12 lib/keystone/os/linux.rb
kanamei-keystone-0.0.14 lib/keystone/os/linux.rb
kanamei-keystone-0.0.15 lib/keystone/os/linux.rb
kanamei-keystone-0.0.16 lib/keystone/os/linux.rb
kanamei-keystone-0.0.17 lib/keystone/os/linux.rb
kanamei-keystone-0.0.18 lib/keystone/os/linux.rb
kanamei-keystone-0.0.19 lib/keystone/os/linux.rb
kanamei-keystone-0.0.20 lib/keystone/os/linux.rb
kanamei-keystone-0.0.21 lib/keystone/os/linux.rb
kanamei-keystone-0.0.22 lib/keystone/os/linux.rb
kanamei-keystone-0.0.23 lib/keystone/os/linux.rb
kanamei-keystone-0.0.24 lib/keystone/os/linux.rb
kanamei-keystone-0.0.25 lib/keystone/os/linux.rb
kanamei-keystone-0.0.26 lib/keystone/os/linux.rb
kanamei-keystone-0.0.27 lib/keystone/os/linux.rb
keystone-0.0.29 lib/keystone/os/linux.rb