From 5bf682af2d0faa5b09e0ac64737f210b426d8ad0 Mon Sep 17 00:00:00 2001 From: Ian Wienand 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 --- modules/jenkins/lib/facter/memorytotalbytes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/jenkins/lib/facter/memorytotalbytes.rb b/modules/jenkins/lib/facter/memorytotalbytes.rb index 829810d14c..157196d5b7 100755 --- a/modules/jenkins/lib/facter/memorytotalbytes.rb +++ b/modules/jenkins/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