From f2d759d1f5bb3f7326e0b0b079e89838e24613cd Mon Sep 17 00:00:00 2001 From: Ian Wienand <iwienand@redhat.com> Date: Thu, 6 Nov 2014 10:39:36 +1100 Subject: [PATCH] Don't use -o argument to "free" The /bin/free on Fedora 21 doesn't understand -o argument to free; that being: --- -o, --old Display the output in old format, the only difference being this option will disable the display of the "buffer adjusted" line. --- i.e. the difference is the "-/+ buffers/cache" line. Since the sed only matches on the line starting "^Mem", this is not relevant anyway. Change-Id: Ib2f763ea82b9a3b397d202453099d58e5dd5a355 --- lib/facter/memorytotalbytes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/memorytotalbytes.rb b/lib/facter/memorytotalbytes.rb index 829810d..157196d 100755 --- a/lib/facter/memorytotalbytes.rb +++ b/lib/facter/memorytotalbytes.rb @@ -2,6 +2,6 @@ Facter.add("memorytotalbytes") do setcode do - Facter::Util::Resolution.exec('free -bo | sed -n \'s/^Mem:\W\+\([0-9]\+\).*$/\1/p\'') + Facter::Util::Resolution.exec('free -b | sed -n \'s/^Mem:\W\+\([0-9]\+\).*$/\1/p\'') end end