Commit 53494ba9 authored by Alexander Kapshuk's avatar Alexander Kapshuk Committed by Greg Kroah-Hartman

ver_linux: libcpp, fix missing output

Neither 'libg++.so', nor 'libstdc++.so' were found where the current
implementation expects them to be found in the distros below.

Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1

Which results in zero ouput generated.

The proposed implementation relies on 'ldconfig' to locate the libraries
in question.  'Sed' is used to do the text processing.
Signed-off-by: default avatarAlexander Kapshuk <alexander.kapshuk@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e5f739c
...@@ -121,9 +121,18 @@ awk '/^ldd/{ ...@@ -121,9 +121,18 @@ awk '/^ldd/{
substr($0,RSTART,RLENGTH)) substr($0,RSTART,RLENGTH))
}' }'
ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \ libcpp=`ldconfig -p 2>/dev/null |
'{print "Linux C++ Library " $4"."$5"."$6}' awk '/(libg|stdc)[+]+\.so/ {
print $NF
exit
}
'`
test -r "$libcpp" &&
ls -l $libcpp |
sed '
s!.*so\.!!
s!^!Linux C++ Library\t!
'
ps --version 2>&1 | grep version | awk \ ps --version 2>&1 | grep version | awk \
'NR==1{print "Procps ", $NF}' 'NR==1{print "Procps ", $NF}'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment