* [PATCH] scripts/ver_linux
@ 2009-08-14 5:57 Christian Kujau
2009-08-17 5:47 ` Amerigo Wang
0 siblings, 1 reply; 5+ messages in thread
From: Christian Kujau @ 2009-08-14 5:57 UTC (permalink / raw)
To: LKML; +Cc: torvalds
Hi there,
sometimes I'm using scripts/ver_linux to quickly have an overview of my
(build-)environment. The output is usually a bit off, since I don't have
"kbd" or "console-tools" installed and don't have /sbin:/usr/sbin in my
PATH. The patch below makes scripts/ver_linux print a better result,
compared to its original output:
-module-init-tools found
+module-init-tools 3.4
+e2fsprogs 1.41.3
+jfsutils 1.1.12
+reiserfsprogs 3.6.19
+reiser4progs 1.0.6
+xfsprogs 2.9.8
Linux C Library 2.7
Procps 3.2.7
-Kbd loadkeys:
+Net-tools 1.60
Sh-utils 6.10
Signed-off-by: Christian Kujau <lists@nerdbynature.de>
--- linux-2.6-git/scripts/ver_linux.orig 2009-08-14 07:47:12.185695350 +0200
+++ linux-2.6-git/scripts/ver_linux 2009-08-14 07:47:23.642348227 +0200
@@ -4,6 +4,7 @@
# /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
# differ on your system.
#
+PATH="$PATH":/sbin:/usr/sbin
echo 'If some fields are empty or look unusual you may have an old version.'
echo 'Compare to the current minimal requirements in Documentation/Changes.'
echo ' '
@@ -76,7 +77,7 @@ ifconfig --version 2>&1 | grep tools | a
# Kbd needs 'loadkeys -h',
loadkeys -h 2>&1 | awk \
-'(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
+'(NR==1 && ($1 = /^loadkeys/)) {print "Kbd ", $3}'
# while console-tools needs 'loadkeys -V'.
loadkeys -V 2>&1 | awk \
--
BOFH excuse #17:
fat electrons in the lines
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts/ver_linux
2009-08-14 5:57 [PATCH] scripts/ver_linux Christian Kujau
@ 2009-08-17 5:47 ` Amerigo Wang
2009-08-17 5:54 ` Christian Kujau
0 siblings, 1 reply; 5+ messages in thread
From: Amerigo Wang @ 2009-08-17 5:47 UTC (permalink / raw)
To: Christian Kujau; +Cc: LKML, torvalds
On Thu, Aug 13, 2009 at 10:57:17PM -0700, Christian Kujau wrote:
>Hi there,
>
>sometimes I'm using scripts/ver_linux to quickly have an overview of my
>(build-)environment. The output is usually a bit off, since I don't have
>"kbd" or "console-tools" installed and don't have /sbin:/usr/sbin in my
>PATH.
Hmm, so probably you are also using a Red Hat distribution?
AFAIK, only some Fedora and RHEL don't have /sbin and /usr/sbin in $PATH.
Anyway, it looks reasonable.
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Thanks.
>The patch below makes scripts/ver_linux print a better result,
>compared to its original output:
>
>-module-init-tools found
>+module-init-tools 3.4
>+e2fsprogs 1.41.3
>+jfsutils 1.1.12
>+reiserfsprogs 3.6.19
>+reiser4progs 1.0.6
>+xfsprogs 2.9.8
> Linux C Library 2.7
> Procps 3.2.7
>-Kbd loadkeys:
>+Net-tools 1.60
> Sh-utils 6.10
>
>Signed-off-by: Christian Kujau <lists@nerdbynature.de>
>
>--- linux-2.6-git/scripts/ver_linux.orig 2009-08-14 07:47:12.185695350 +0200
>+++ linux-2.6-git/scripts/ver_linux 2009-08-14 07:47:23.642348227 +0200
>@@ -4,6 +4,7 @@
> # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
> # differ on your system.
> #
>+PATH="$PATH":/sbin:/usr/sbin
> echo 'If some fields are empty or look unusual you may have an old version.'
> echo 'Compare to the current minimal requirements in Documentation/Changes.'
> echo ' '
>@@ -76,7 +77,7 @@ ifconfig --version 2>&1 | grep tools | a
>
> # Kbd needs 'loadkeys -h',
> loadkeys -h 2>&1 | awk \
>-'(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
>+'(NR==1 && ($1 = /^loadkeys/)) {print "Kbd ", $3}'
>
> # while console-tools needs 'loadkeys -V'.
> loadkeys -V 2>&1 | awk \
>
>--
>BOFH excuse #17:
>
>fat electrons in the lines
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts/ver_linux
2009-08-17 5:47 ` Amerigo Wang
@ 2009-08-17 5:54 ` Christian Kujau
2009-08-24 3:52 ` Christian Kujau
0 siblings, 1 reply; 5+ messages in thread
From: Christian Kujau @ 2009-08-17 5:54 UTC (permalink / raw)
To: Amerigo Wang; +Cc: LKML, torvalds
On Mon, 17 Aug 2009 at 13:47, Amerigo Wang wrote:
> Hmm, so probably you are also using a Red Hat distribution?
> AFAIK, only some Fedora and RHEL don't have /sbin and /usr/sbin in $PATH.
No, Debian Linux - but as a mere user I never have sbin directories in my
PATH. And since it is a headless system, I removed the console-* packages,
that's why I did not have the "loadkeys" command installed. No big deal,
but the ver_linux output looked weird....
Thanks for the ACK,
Christian.
--
BOFH excuse #424:
operation failed because: there is no message for this error (#1014)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts/ver_linux
2009-08-17 5:54 ` Christian Kujau
@ 2009-08-24 3:52 ` Christian Kujau
2009-08-24 4:19 ` Amerigo Wang
0 siblings, 1 reply; 5+ messages in thread
From: Christian Kujau @ 2009-08-24 3:52 UTC (permalink / raw)
To: Amerigo Wang; +Cc: LKML, torvalds, bunk
On Sun, 16 Aug 2009 at 22:54, Christian Kujau wrote:
> On Mon, 17 Aug 2009 at 13:47, Amerigo Wang wrote:
> > Hmm, so probably you are also using a Red Hat distribution?
> > AFAIK, only some Fedora and RHEL don't have /sbin and /usr/sbin in $PATH.
>
> No, Debian Linux - but as a mere user I never have sbin directories in my
> PATH. And since it is a headless system, I removed the console-* packages,
> that's why I did not have the "loadkeys" command installed. No big deal,
> but the ver_linux output looked weird....
Hm, looking at the changelog of scripts/ver_linux again I see:
> commit 48a61569bb5396415c5dad0e81e1cfeb87c0aca3
> Author: Adrian Bunk <bunk@kernel.org>
> Date: Wed Jul 23 22:50:45 2008 +0300
>
> kbuild: scripts/ver_linux: don't set PATH
>
> It would have saved both a bug submitter and me a few hours if
> scripts/ver_linux had picked the same gcc as the build.
>
> Since I can't see any reason why it fiddles with PATH at all this
> patch therefore removes the PATH setting.
I'm still a bit confused, Amerigo, why you thought not having /sbin
directories in PATH was distribution specific - I don't recall any
distribution where mere users had /sbin:/usr/sbin in their PATH.
I was tempted to specify the whole path in ver_linux, but that'll break
for sure.
Adrian, what do you think - this patch puts the sbin paths *after*
PATH, so that should not lead to such conflicts your commit once fixed,
right?
Christian.
--- linux-2.6-git/scripts/ver_linux.orig 2009-08-14 07:47:12.185695350 +0200
+++ linux-2.6-git/scripts/ver_linux 2009-08-14 07:47:23.642348227 +0200
@@ -4,6 +4,7 @@
# /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
# differ on your system.
#
+PATH="$PATH":/sbin:/usr/sbin
echo 'If some fields are empty or look unusual you may have an old version.'
echo 'Compare to the current minimal requirements in Documentation/Changes.'
echo ' '
@@ -76,7 +77,7 @@ ifconfig --version 2>&1 | grep tools | a
# Kbd needs 'loadkeys -h',
loadkeys -h 2>&1 | awk \
-'(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
+'(NR==1 && ($1 = /^loadkeys/)) {print "Kbd ", $3}'
# while console-tools needs 'loadkeys -V'.
loadkeys -V 2>&1 | awk \
--
BOFH excuse #75:
There isn't any problem
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts/ver_linux
2009-08-24 3:52 ` Christian Kujau
@ 2009-08-24 4:19 ` Amerigo Wang
0 siblings, 0 replies; 5+ messages in thread
From: Amerigo Wang @ 2009-08-24 4:19 UTC (permalink / raw)
To: Christian Kujau; +Cc: Amerigo Wang, LKML, torvalds, bunk
On Sun, Aug 23, 2009 at 08:52:05PM -0700, Christian Kujau wrote:
>On Sun, 16 Aug 2009 at 22:54, Christian Kujau wrote:
>> On Mon, 17 Aug 2009 at 13:47, Amerigo Wang wrote:
>> > Hmm, so probably you are also using a Red Hat distribution?
>> > AFAIK, only some Fedora and RHEL don't have /sbin and /usr/sbin in $PATH.
>>
>> No, Debian Linux - but as a mere user I never have sbin directories in my
>> PATH. And since it is a headless system, I removed the console-* packages,
>> that's why I did not have the "loadkeys" command installed. No big deal,
>> but the ver_linux output looked weird....
>
>Hm, looking at the changelog of scripts/ver_linux again I see:
>
> > commit 48a61569bb5396415c5dad0e81e1cfeb87c0aca3
> > Author: Adrian Bunk <bunk@kernel.org>
> > Date: Wed Jul 23 22:50:45 2008 +0300
> >
> > kbuild: scripts/ver_linux: don't set PATH
> >
> > It would have saved both a bug submitter and me a few hours if
> > scripts/ver_linux had picked the same gcc as the build.
> >
> > Since I can't see any reason why it fiddles with PATH at all this
> > patch therefore removes the PATH setting.
>
>I'm still a bit confused, Amerigo, why you thought not having /sbin
>directories in PATH was distribution specific - I don't recall any
>distribution where mere users had /sbin:/usr/sbin in their PATH.
Try archlinux.
>I was tempted to specify the whole path in ver_linux, but that'll break
>for sure.
>
>Adrian, what do you think - this patch puts the sbin paths *after*
>PATH, so that should not lead to such conflicts your commit once fixed,
>right?
I believe so.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-24 4:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-14 5:57 [PATCH] scripts/ver_linux Christian Kujau
2009-08-17 5:47 ` Amerigo Wang
2009-08-17 5:54 ` Christian Kujau
2009-08-24 3:52 ` Christian Kujau
2009-08-24 4:19 ` Amerigo Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®