module Aua::OperatingSystems::Linux

Constants

PATTERN_LINUX

Public Class Methods

extend?(agent) click to toggle source
# File lib/aua/operating_systems/linux.rb, line 3
def self.extend?(agent)
  agent.platform_string == "X11" || agent.app_comments_string.match(PATTERN_LINUX)
end

Public Instance Methods

os_name() click to toggle source
# File lib/aua/operating_systems/linux.rb, line 13
def os_name
  :Linux
end
os_version() click to toggle source
# File lib/aua/operating_systems/linux.rb, line 17
def os_version
  @os_version ||= if app_comments_string =~ /OpenBSD/
    "OpenBSD"
  elsif products.include?("Ubuntu")
    "Ubuntu"
  elsif products.include?("Red") && products.include?("Hat")
    "Red Hat"
  elsif products.include?("CentOS")
    "CentOS"
  elsif products.include?("Gentoo")
    "Gentoo"
  elsif products.include?("SUSE")
    "SUSE"
  elsif products.include?("Fedora")
    "Fedora"
  elsif app_comments_string =~ /FreeBSD/
    "FreeBSD"
  elsif raw =~ /SunOS/
    "Solaris"
  elsif raw =~ /Debian/
    "Debian"
  elsif raw =~ /Maemo/
    "Maemo"
  end
end
platform() click to toggle source
# File lib/aua/operating_systems/linux.rb, line 9
def platform
  :X11
end