All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@sw.ru>
To: sam@ravnborg.org, akpm@osdl.org
Cc: jesper.juhl@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH] ver_linux is [censored]
Date: Tue, 21 Aug 2007 11:19:38 +0400	[thread overview]
Message-ID: <20070821071938.GA17761@localhost.sw.ru> (raw)

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}'



             reply	other threads:[~2007-08-21  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21  7:19 Alexey Dobriyan [this message]
2007-08-21  9:56 ` [PATCH] ver_linux is [censored] Jesper Juhl
2007-08-21 23:15   ` Al Viro
2007-08-22  0:02     ` Jesper Juhl
2007-08-22  0:52       ` Al Viro
2007-08-22  1:11         ` Jesper Juhl
2007-08-28 19:21           ` Sam Ravnborg
2007-08-22  9:28         ` Dick Streefland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070821071938.GA17761@localhost.sw.ru \
    --to=adobriyan@sw.ru \
    --cc=akpm@osdl.org \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.