lib/ohai/plugins/linux/platform.rb
#
# Cached /etc/os-release info Hash.  Also has logic for Cisco Nexus
# switches that pulls the chained CISCO_RELEASE_INFO file into the Hash (other
# distros can also reuse this method safely).
#
# @returns [Hash] the canonical, cached Hash of /etc/os-release info or nil
#
Cached /etc/os-release info Hash.  Also has logic for Cisco Nexus
switches that pulls the chained CISCO_RELEASE_INFO file into the Hash (other
distros can also reuse this method safely).
Cached / etc / os - release info Hash . Also has logic for Cisco Nexus switches that pulls the chained CISCO_RELEASE_INFO file into the Hash ( other distros can also reuse this method safely ) .
def os_release_info
    @os_release_info ||=
      begin
        os_release_info = read_os_release_info("/etc/os-release")
        cisco_release_info = os_release_info["CISCO_RELEASE_INFO"] if os_release_info
        if cisco_release_info && File.exist?(cisco_release_info)
          os_release_info.merge!(read_os_release_info(cisco_release_info))
        end
        os_release_info
      end
  end
def os_release_info @os_release_info ||= begin os_release_info = read_os_release_info ( "/etc/os-release" ) cisco_release_info = os_release_info [ "CISCO_RELEASE_INFO" ] if os_release_info if cisco_release_info && File . exist? ( cisco_release_info ) os_release_info . merge! ( read_os_release_info ( cisco_release_info ) ) end os_release_info end end
Cached /etc/os-release info Hash.
Cached / etc / os - release info Hash .
[Hash] the canonical, cached Hash of /etc/os-release info or nil
[ Hash ] the canonical cached Hash of / etc / os - release info or nil