[Pkg-puppet-devel] [facter] 90/180: (#19293) Enhance the release fact for OpenBSD

Stig Sandbeck Mathisen ssm at debian.org
Mon Jun 30 15:06:34 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 c0f24dc3807843c86aab44f3f89065f927cbf36b
Author: Antoine Jacoutot <ajacoutot at gnome.org>
Date:   Sat May 11 10:30:14 2013 +0200

    (#19293) Enhance the release fact for OpenBSD
    
    Currently facter only outputs the main release version number without
    the actual substring information.
    e.g. 5.3 versus 5.3-beta
---
 lib/facter/kernelrelease.rb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/facter/kernelrelease.rb b/lib/facter/kernelrelease.rb
index b30a608..c723ebc 100644
--- a/lib/facter/kernelrelease.rb
+++ b/lib/facter/kernelrelease.rb
@@ -20,6 +20,13 @@ Facter.add(:kernelrelease) do
   setcode 'oslevel -s'
 end
 
+Facter.add("kernelrelease") do
+  confine :kernel => :openbsd
+  setcode do
+    Facter::Util::Resolution.exec("/sbin/sysctl -n kern.version").split(' ')[1]
+  end
+end
+
 Facter.add(:kernelrelease) do
   confine :kernel => "hp-ux"
   setcode do

-- 
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