summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-03-22 21:37:10 -0700
committerAdrien Thebo <adrien.thebo@gmail.com>2011-04-01 18:19:10 -0700
commit861c2b20f44caf4d4f5a1188663f5b82a3435836 (patch)
tree5c4b55991fba453566e9ed0ec2c1c58c75e6900e /lib
parent76f544b261ec1c9712105773946fec7e6d76b4e9 (diff)
downloadfacter-861c2b20f44caf4d4f5a1188663f5b82a3435836.tar.gz
facter-861c2b20f44caf4d4f5a1188663f5b82a3435836.tar.xz
facter-861c2b20f44caf4d4f5a1188663f5b82a3435836.zip
maint: cleanup whitespace
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/memory.rb36
-rw-r--r--lib/facter/util/memory.rb1
2 files changed, 18 insertions, 19 deletions
diff --git a/lib/facter/memory.rb b/lib/facter/memory.rb
index 9dd2e29..0aa5e88 100644
--- a/lib/facter/memory.rb
+++ b/lib/facter/memory.rb
@@ -23,30 +23,30 @@ end
Facter.add("SwapSize") do
confine :kernel => :Darwin
setcode do
- swap = Facter::Util::Resolution.exec('sysctl vm.swapusage')
- swaptotal = 0
- if swap =~ /total = (\S+)/ then swaptotal = $1; end
- swaptotal
+ swap = Facter::Util::Resolution.exec('sysctl vm.swapusage')
+ swaptotal = 0
+ if swap =~ /total = (\S+)/ then swaptotal = $1; end
+ swaptotal
end
end
Facter.add("SwapFree") do
confine :kernel => :Darwin
setcode do
- swap = Facter::Util::Resolution.exec('sysctl vm.swapusage')
- swapfree = 0
- if swap =~ /free = (\S+)/ then swapfree = $1; end
- swapfree
+ swap = Facter::Util::Resolution.exec('sysctl vm.swapusage')
+ swapfree = 0
+ if swap =~ /free = (\S+)/ then swapfree = $1; end
+ swapfree
end
end
Facter.add("SwapEncrypted") do
confine :kernel => :Darwin
setcode do
- swap = Facter::Util::Resolution.exec('sysctl vm.swapusage')
- encrypted = false
- if swap =~ /\(encrypted\)/ then encrypted = true; end
- encrypted
+ swap = Facter::Util::Resolution.exec('sysctl vm.swapusage')
+ encrypted = false
+ if swap =~ /\(encrypted\)/ then encrypted = true; end
+ encrypted
end
end
@@ -57,9 +57,9 @@ if Facter.value(:kernel) == "AIX" and Facter.value(:id) == "root"
if dev =~ /^\/\S+\s.*\s+(\S+)MB\s+(\S+)MB/
swaptotal += $1.to_i
swapfree += $2.to_i
- end
- end
-
+ end
+ end
+
Facter.add("SwapSize") do
confine :kernel => :aix
setcode do
@@ -154,9 +154,9 @@ if Facter.value(:kernel) == "SunOS"
if dev =~ /^\/\S+\s.*\s+(\d+)\s+(\d+)$/
swaptotal += $1.to_i / 2
swapfree += $2.to_i / 2
- end
- end
-
+ end
+ end
+
Facter.add("SwapSize") do
confine :kernel => :sunos
setcode do
diff --git a/lib/facter/util/memory.rb b/lib/facter/util/memory.rb
index 029b117..b7ad198 100644
--- a/lib/facter/util/memory.rb
+++ b/lib/facter/util/memory.rb
@@ -94,4 +94,3 @@ module Facter::Memory
end
end
end
-