[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 3a39dd8353b6308cf49522990104cc63e55d7cda
Paul Nasrat
pnasrat at googlemail.com
Fri Jan 29 17:22:30 UTC 2010
The following commit has been merged in the upstream branch:
commit b533e78689951cdf5989cb1014680958c903ab9e
Author: Todd Zullinger <tmz at pobox.com>
Date: Tue May 19 21:16:49 2009 -0400
Tighten operatingsystemrelease regex on CentOS < 5
The previous check for /5/ matched releases like 4.5, which is not the
intent. The previous check was introduced in 095eb15e, and changed the
pattern from /^5^/. Using /^5/ to match when the release begins with 5
seems saner.
Signed-off-by: Paul Nasrat <pnasrat at googlemail.com>
diff --git a/lib/facter/operatingsystemrelease.rb b/lib/facter/operatingsystemrelease.rb
index 4393bfa..0864b4d 100644
--- a/lib/facter/operatingsystemrelease.rb
+++ b/lib/facter/operatingsystemrelease.rb
@@ -54,7 +54,7 @@ Facter.add(:operatingsystemrelease) do
confine :operatingsystem => %w{CentOS}
setcode do
centos_release = Facter::Util::Resolution.exec("sed -r -e 's/CentOS release //' -e 's/ \\((Branch|Final)\\)//' /etc/redhat-release")
- if centos_release =~ /5/
+ if centos_release =~ /^5/
release = Facter::Util::Resolution.exec('rpm -q --qf \'%{VERSION}.%{RELEASE}\' centos-release | cut -d. -f1,2')
else
release = centos_release
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list