summaryrefslogtreecommitdiffstats
path: root/bin/facter
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-14 09:36:32 -0500
committerLuke Kanies <luke@madstop.com>2008-05-14 09:36:32 -0500
commit48b874454cd4a6081e96365d3a19fb2b08c9d740 (patch)
tree8bd2373b8070709c0d90d206709527c7f4a0a3c5 /bin/facter
parent5889e43e871e21bfebaa99d7a21c292d0e64b575 (diff)
downloadfacter-48b874454cd4a6081e96365d3a19fb2b08c9d740.tar.gz
facter-48b874454cd4a6081e96365d3a19fb2b08c9d740.tar.xz
facter-48b874454cd4a6081e96365d3a19fb2b08c9d740.zip
Updating the executable to not use Facter.each.
The method will need to be added back in, since it's apparently used in iClassify, but at least the executable works again now.
Diffstat (limited to 'bin/facter')
-rwxr-xr-xbin/facter9
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/facter b/bin/facter
index 1dec66b..e9604ab 100755
--- a/bin/facter
+++ b/bin/facter
@@ -107,13 +107,10 @@ ARGV.each { |item|
names.push item
}
-facts = {}
-
if names.empty?
- Facter.each { |name,fact|
- facts[name] = fact
- }
+ facts = Facter.to_hash
else
+ facts = {}
names.each { |name|
begin
facts[name] = Facter.value(name)
@@ -139,5 +136,3 @@ facts.sort { |a, b| a[0].to_s <=> b[0].to_s }.each { |name,value|
puts "%s => %s" % [name,value]
end
}
-
-# $Id: facter,v 1.1.1.1 2004/03/21 21:06:27 luke Exp $