openbsd-ports/sysutils/ruby-facter/patches/patch-lib_facter_memory_rb
2011-12-06 14:39:01 +00:00

13 lines
546 B
Plaintext

$OpenBSD: patch-lib_facter_memory_rb,v 1.2 2011/12/06 14:39:01 robert Exp $
--- lib/facter/memory.rb.orig Thu Jun 16 20:24:42 2011
+++ lib/facter/memory.rb Tue Dec 6 15:34:17 2011
@@ -93,7 +93,7 @@ if Facter.value(:kernel) == "AIX" and Facter.value(:id
end
if Facter.value(:kernel) == "OpenBSD"
- swap = Facter::Util::Resolution.exec('swapctl -l | sed 1d')
+ swap = Facter::Util::Resolution.exec('swapctl -l | sed 1d') || ""
swapfree, swaptotal = 0, 0
swap.each do |dev|
if dev =~ /^\S+\s+(\S+)\s+\S+\s+(\S+)\s+.*$/