[Pkg-puppet-devel] [facter] 46/352: (#20994) fix incorrectly set memorysize on AIX using svmon (was set to 0) tested on AIX 5.3, 6.1, and 7.1

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:30 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 5acfe3a26496d4192ed16f21c46bbdcc5391fc07
Author: Aran Cox <aran.cox at act.org>
Date:   Fri May 31 11:11:22 2013 -0500

    (#20994) fix incorrectly set memorysize on AIX using svmon (was set to 0)
    tested on AIX 5.3, 6.1, and 7.1
---
 lib/facter/util/memory.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/facter/util/memory.rb b/lib/facter/util/memory.rb
index 9a2401e..94b47a8 100644
--- a/lib/facter/util/memory.rb
+++ b/lib/facter/util/memory.rb
@@ -109,6 +109,10 @@ module Facter::Memory
       Facter::Util::Resolution.exec("sysctl -n hw.memsize")
     when /Dragonfly/i
       Facter::Util::Resolution.exec("sysctl -n hw.physmem")
+    when /AIX/i
+      if Facter::Util::Resolution.exec("/usr/bin/svmon -O unit=KB") =~ /^memory\s+(\d+)\s+/
+        $1
+      end
     end
   end
 
@@ -116,6 +120,8 @@ module Facter::Memory
     case kernel
     when /OpenBSD/i, /FreeBSD/i, /Darwin/i, /Dragonfly/i
       value.to_f / 1024.0 / 1024.0
+    when /AIX/i
+      value.to_f / 1024.0
     else
       value.to_f
     end

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