Signed-off-by: Paul Nasrat <[EMAIL PROTECTED]>
---
lib/facter/kernel.rb | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lib/facter/kernel.rb b/lib/facter/kernel.rb
index 01fe85b..5a0eb19 100644
--- a/lib/facter/kernel.rb
+++ b/lib/facter/kernel.rb
@@ -1,3 +1,9 @@
Facter.add(:kernel) do
- setcode 'uname -s'
+ setcode do
+ require 'rbconfig'
+ case Config::CONFIG['host_os']
+ when /mswin/i then 'windows'
+ else Facter::Util::Resolution.exec("uname -s")
+ end
+ end
end
--
1.5.3.4
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---