[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 3a39dd8353b6308cf49522990104cc63e55d7cda

James Turnbull james at lovedthanlost.net
Fri Jan 29 17:22:09 UTC 2010


The following commit has been merged in the upstream branch:
commit 86b01bf61b143e03647f5983cbc99beae8744704
Author: James Turnbull <james at lovedthanlost.net>
Date:   Sat Feb 28 02:45:57 2009 +1100

    Fixed #2032 - file.open hanging on /proc/uptime on some platform

diff --git a/CHANGELOG b/CHANGELOG
index fc0d4d7..ac03ca6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+1.5.x:
+   Fixed #2032 - file.open hanging on /proc/uptime on some platform 
+
 1.5.4:
     Fixed #1966 - Added physicalprocessorcount fact
 
diff --git a/lib/facter/util/uptime.rb b/lib/facter/util/uptime.rb
index 1be3b98..ebba275 100644
--- a/lib/facter/util/uptime.rb
+++ b/lib/facter/util/uptime.rb
@@ -14,7 +14,8 @@ module Facter::Util::Uptime
     end
 
     def self.get_uptime
-        uptime, idletime = File.open("/proc/uptime").gets.split(" ")
+        r = IO.popen("/bin/cat /proc/uptime")
+        uptime, idletime = r.readline.split(" ")        
         uptime_seconds = uptime.to_i
     end
 

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list