[Pkg-puppet-devel] [facter] 17/352: (#12504) Read correct file for operatingsystemrelase on Ubuntu

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 08727ddc4a93c36df4ca097a4e9b99dfac9d56fa
Author: Brendan Murtagh <bmurtagh at powerhrg.com>
Date:   Wed Sep 11 18:08:19 2013 -0400

    (#12504) Read correct file for operatingsystemrelase on Ubuntu
---
 lib/facter/operatingsystemrelease.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/facter/operatingsystemrelease.rb b/lib/facter/operatingsystemrelease.rb
index 319896d..7653cbe 100644
--- a/lib/facter/operatingsystemrelease.rb
+++ b/lib/facter/operatingsystemrelease.rb
@@ -61,8 +61,8 @@ end
 Facter.add(:operatingsystemrelease) do
   confine :operatingsystem => %w{Ubuntu}
   setcode do
-    if release = Facter::Util::FileRead.read('/etc/issue')
-      if match = release.match(/Ubuntu ((\d+.\d+)(\.(\d+))?)/)
+    if release = Facter::Util::FileRead.read('/etc/lsb-release')
+      if match = release.match(/DISTRIB_RELEASE=((\d+.\d+)(\.(\d+))?)/)
         # Return only the major and minor version numbers.  This behavior must
         # be preserved for compatibility reasons.
         match[2]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list