This just removes the threading?

Otherwise, it seems logically equivalent, right?

Well, actually, seems like this will always have a value, where  
previously it could have been nil.

On May 2, 2009, at 7:25 AM, James Turnbull wrote:

>
>
> Signed-off-by: James Turnbull <[email protected]>
> ---
> lib/facter/virtual.rb |   14 +++++---------
> 1 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
> index 3ad6f8a..393a1de 100644
> --- a/lib/facter/virtual.rb
> +++ b/lib/facter/virtual.rb
> @@ -18,15 +18,11 @@ Facter.add("virtual") do
>             end
>         end
>
> -        Thread::exclusive do
> -            if FileTest.exists?("/proc/xen/capabilities") &&  
> FileTest.readable?("/proc/xen/capabilities")
> -                txt = File.read("/proc/xen/capabilities")
> -                    if txt =~ /control_d/i
> -                        result = "xen0"
> -                    else
> -                        result = "xenu"
> -                    end
> -             end
> +        # xen
> +        if File.exists?("/proc/xen/capabilities") &&  
> FileTest.readable?("/proc/xen/capabilities") && File.read("/proc/xen/ 
> capabilities") =~ /control_d/i
> +            result="xen0"
> +        elsif File.exists?("/proc/sys/xen/independent_wallclock")
> +            result="xenu"
>         end
>
>         if result == "physical"
> -- 
> 1.6.0.6
>
>
> >


-- 
A little government and a little luck are necessary in life, but only a
fool trusts either of them. -- P. J. O'Rourke
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


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