Sha256: 89cda24c7ec86cd7d6d0240be57f68c9524b65290aff9583139c53ce1a1375d9
Contents?: true
Size: 647 Bytes
Versions: 3
Compression:
Stored size: 647 Bytes
Contents
# Fact: lsbdistdescription # # Purpose: Return Linux Standard Base information for the host. # # Resolution: # Uses the lsb_release system command # # Caveats: # Only works on Linux (and the kfreebsd derivative) systems. # Requires the lsb_release program, which may not be installed by default. # Also is as only as accurate as that program outputs. Facter.add(:lsbdistdescription) do confine :kernel => [ :linux, :"gnu/kfreebsd" ] setcode do if output = Facter::Core::Execution.exec('lsb_release -d -s 2>/dev/null') # the output may be quoted (at least it is on gentoo) output.sub(/^"(.*)"$/,'\1') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facter-2.0.1.rc1 | lib/facter/lsbdistdescription.rb |
facter-2.0.1.rc1-x86-mingw32 | lib/facter/lsbdistdescription.rb |
facter-2.0.1.rc1-universal-darwin | lib/facter/lsbdistdescription.rb |