Fix ver_linux glibc version printing (for real this time) Alexey Dobriyan reported that commit 4a645d5ea65baaa5736bcb566673bf4a351b2ad8 broke ver_linux when glibc has a 3 digit version number, and proposed a patch. Al Viro then suggested a simpler way to solve the problem which I've then simply put into patch form.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -65,9 +65,8 @@ isdnctrl 2>&1 | grep version | awk \ · 64 unmodified lines | ||
| 65 | 65 | showmount --version 2>&1 | grep nfs-utils | awk \ |
| 66 | 66 | 'NR==1{print "nfs-utils ", $NF}' |
| 67 | 67 | |
| 68 | −ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \ | |
| 69 | −-e 's/\.so$//' | sed -e 's/>//' | \ | |
| 70 | −awk -F'[.-]' '{print "Linux C Library "$(NF-1)"."$NF}' | |
| 68 | +echo -n "Linux C Library " | |
| 69 | +sed -n -e '/^.*\/libc-\([^/]*\)\.so$/{s//\1/;p;q}' < /proc/self/maps | |
| 71 | 70 | |
| 72 | 71 | ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \ |
| 73 | 72 | 'NR==1{print "Dynamic linker (ldd) ", $NF}' |