Re: Installing kernel 2.6.4 0n (not over) 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jludwig wrote:
Probably but that's how it worked on my machine

Can you quote a bit of the message you're commenting on? Not the whole thing, but some of it. I understand your response since I just wrote mine, but I doubt many others will.

Your machine probably doesn't have a true host name except "localhost.localdomain", in which case your script would sort of work.
However, as soon as it has a real node name, it'll break. "uname -r" to
return just the kernel version, followed by "cut -d . -f2" is the right
way to go. Examples:


[root@golem root]# uname -a
Linux golem.corp.publichost.com 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux
[root@golem root]# uname -a | cut -d . -f3
publichost


"publichost" is the third part of my machine's FQDN.  Not what you want.

[root@golem root]# uname -r
2.4.22-1.2174.nptl
[root@golem root]# uname -r | cut -d . -f2
4

Ah!  "4" is the second part of "2.4.22-1.2174.nptl".  That's what you
want.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-      Cuteness can be overcome through sufficient bastardry         -
-                                         --Mark 'Kamikaze' Hughes   -
----------------------------------------------------------------------



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux