[PATCH] ver_linux is [censored]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexey Dobriyan
Date: Tuesday, August 21, 2007 - 12:19 am

Commit 4a645d5ea65baaa5736bcb566673bf4a351b2ad8 broke ver_linux
on etch which glibc has 3-digit version number. Patch replaces awk
wanking with more robust sed wanking.

Tested on gentoo, etch, centos 4.2.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

 scripts/ver_linux |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -65,9 +65,9 @@ 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        "
+ls -l `ldd /bin/sh | awk '/libc/{print $3}'` 	| \
+	sed -e 's/.*libc-//' -e 's/\.so$//'
 
 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
 'NR==1{print "Dynamic linker (ldd)  ", $NF}'


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ver_linux is [censored], Alexey Dobriyan, (Tue Aug 21, 12:19 am)
Re: [PATCH] ver_linux is [censored], Jesper Juhl, (Tue Aug 21, 2:56 am)
Re: [PATCH] ver_linux is [censored], Al Viro, (Tue Aug 21, 4:15 pm)
Re: [PATCH] ver_linux is [censored], Jesper Juhl, (Tue Aug 21, 5:02 pm)
Re: [PATCH] ver_linux is [censored], Al Viro, (Tue Aug 21, 5:52 pm)
Re: [PATCH] ver_linux is [censored], Jesper Juhl, (Tue Aug 21, 6:11 pm)
Re: [PATCH] ver_linux is [censored], Sam Ravnborg, (Tue Aug 28, 12:21 pm)