summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/ver_linux15
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/ver_linux b/scripts/ver_linux
index a7d0ecad5ad4..882ddb961b49 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -121,9 +121,18 @@ awk '/^ldd/{
substr($0,RSTART,RLENGTH))
}'
-ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \
- '{print "Linux C++ Library " $4"."$5"."$6}'
-
+libcpp=`ldconfig -p 2>/dev/null |
+ 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 \
'NR==1{print "Procps ", $NF}'