Issue #1558 has been updated by jamtur01. Status changed from Ready for Checkin to Closed % Done changed from 0 to 100
Applied in changeset commit:"0fac7040920a9d820f656ce3f121ae2f342df8e4". ---------------------------------------- Bug #1558: factor 1.5.1 virtual fact not correct for a xen dom0 http://reductivelabs.com/issues/show/1558 Author: lludwig Status: Closed Priority: Normal Assigned to: Category: library Target version: 1.5.2 Complexity: Unknown Affected version: 0.25.0 Keywords: on a centos 5.2 x86_64 dom0 it retruns xenu <pre> # facter virtual xenu </pre> Here is a patch to fix the issue. <pre> --- facter-1.5.1/lib/facter/virtual.rb 2008-08-18 20:41:29.000000000 -0400 +++ facter-1.5.1.new/lib/facter/virtual.rb 2008-09-04 10:56:08.000000000 -0400 @@ -11,12 +11,14 @@ result = "openvz" end - if FileTest.exists?("/proc/sys/xen/independent_wallclock") - result = "xenu" - elsif FileTest.exists?("/proc/xen/capabilities") - txt = File.read("/proc/xen/capabilities") - if txt =~ /control_d/i - result = "xen0" + # test if a xen domU + # half assed logic but it works + if FileTest.exists?("/proc/xen/capabilities") + xentest = %x{cat /proc/xen/capabilities} + if xentest =~ /control_d/i + result = "xen0" + else + result = "xenu" end end </pre> After patch, both domu and a dom0 return correct results dom0 test: <pre> # facter virtual xen0 </pre> domu test: <pre> # facter virtual xenu </pre> ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
