Please review pull request #185: two small HP-UX improvements opened by (mmoll)

Description:

Hi,

here are two small HP-UX improvements:
92feb6a should be quite self-explaining.
8fdbf46 delete the first two chars form the kernel version gained via "uname -r", so kernelrelease is "11.31" instead of "B.11.31", kernelmajversion is "11.31" instead of "B.11" and so on...

  • Opened: Mon Mar 05 19:37:27 UTC 2012
  • Based on: puppetlabs:master (a4f433e59653d0e0827744c7219d1c40aaabf0a2)
  • Requested merge: mmoll:hpux4pull (92feb6a3c2d148bc7a1c2af2bbe2cf9c784b3fd0)

Diff follows:

diff --git a/lib/facter/kernelrelease.rb b/lib/facter/kernelrelease.rb
index a38b128..b33ca91 100644
--- a/lib/facter/kernelrelease.rb
+++ b/lib/facter/kernelrelease.rb
@@ -21,6 +21,14 @@
 end
 
 Facter.add(:kernelrelease) do
+  confine :kernel => :"hp-ux"
+  version=Facter::Util::Resolution.exec('uname -r')
+  setcode do
+    version[2..-1]
+  end
+end
+
+Facter.add(:kernelrelease) do
   confine :kernel => %{windows}
   setcode do
     require 'facter/util/wmi'
diff --git a/lib/facter/ssh.rb b/lib/facter/ssh.rb
index 23c6578..a259d3c 100644
--- a/lib/facter/ssh.rb
+++ b/lib/facter/ssh.rb
@@ -11,7 +11,7 @@
 ## Facts related to SSH
 ##
 
-["/etc/ssh","/usr/local/etc/ssh","/etc","/usr/local/etc"].each do |dir|
+["/etc/ssh","/usr/local/etc/ssh","/etc","/usr/local/etc","/etc/opt/ssh"].each do |dir|
   {"SSHDSAKey" => { :file => "ssh_host_dsa_key.pub", :sshfprrtype => 2 } , "SSHRSAKey" => { :file => "ssh_host_rsa_key.pub", :sshfprrtype => 1 }, "SSHECDSAKey" => { :file => "ssh_host_ecdsa_key.pub", :sshfprrtype => 3 } }.each do |name,key|
     Facter.add(name) do
       setcode do

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to