summaryrefslogtreecommitdiff
path: root/scripts/ver_linux
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ver_linux')
-rwxr-xr-xscripts/ver_linux9
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/ver_linux b/scripts/ver_linux
index 8f8df93141a9..ab69ecefedbd 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -21,9 +21,7 @@ gcc --version 2>&1| grep gcc | awk \
make --version 2>&1 | awk -F, '{print $1}' | awk \
'/GNU Make/{print "Gnu make ",$NF}'
-ld -v | awk -F\) '{print $1}' | awk \
-'/BFD/{print "binutils ",$NF} \
-/^GNU/{print "binutils ",$4}'
+echo "binutils $(ld -v | egrep -o '[0-9]+\.[0-9\.]+')"
echo -n "util-linux "
fdformat --version | awk '{print $NF}' | sed -e s/^util-linux-// -e s/\)$//
@@ -65,9 +63,8 @@ isdnctrl 2>&1 | grep version | awk \
showmount --version 2>&1 | grep nfs-utils | awk \
'NR==1{print "nfs-utils ", $NF}'
-ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \
--e 's/\.so$//' | sed -e 's/>//' | \
-awk -F'[.-]' '{print "Linux C Library "$(NF-1)"."$NF}'
+echo -n "Linux C Library "
+sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps
ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
'NR==1{print "Dynamic linker (ldd) ", $NF}'