summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@vmware.com>2010-11-10 11:06:34 -0800
committerBryan McLellan <btm@opscode.com>2011-04-06 11:41:11 -0700
commit884b94bbcae6d98629be833c02aff9ddfb29680f (patch)
treef679efb365a3e52cebe102de927ab2ccafd39d7e /lib/ohai/plugins
parentcf7d55b5919b34e38c4b986b8f17e4390f8f598b (diff)
downloadohai-884b94bbcae6d98629be833c02aff9ddfb29680f.tar.gz
newer redhat flavors dont have /lib/libc.so.6, try /lib64 too
Diffstat (limited to 'lib/ohai/plugins')
-rw-r--r--lib/ohai/plugins/c.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/ohai/plugins/c.rb b/lib/ohai/plugins/c.rb
index dd110fc6..f942668d 100644
--- a/lib/ohai/plugins/c.rb
+++ b/lib/ohai/plugins/c.rb
@@ -37,13 +37,16 @@ if status == 0
end
#glibc
-status, stdout, stderr = run_command(:no_status_check => true, :command => "/lib/libc.so.6")
-if status == 0
- description = stdout.split($/).first
- if description =~ /(\d+\.\d+\.?\d*)/
- c[:glibc] = Mash.new
- c[:glibc][:version] = $1
- c[:glibc][:description] = description
+["/lib/libc.so.6", "/lib64/libc.so.6"].each do |glibc|
+ status, stdout, stderr = run_command(:no_status_check => true, :command => glibc)
+ if status == 0
+ description = stdout.split($/).first
+ if description =~ /(\d+\.\d+\.?\d*)/
+ c[:glibc] = Mash.new
+ c[:glibc][:version] = $1
+ c[:glibc][:description] = description
+ end
+ break
end
end