LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 11-04-2004, 01:04 AM   #1
kesari
LQ Newbie
 
Registered: Aug 2003
Location: Bangalore
Posts: 4

Rep: Reputation: 0
Question changing uname -r output


Is there a way I can change the output of uname. This is because I am trying to install a kernel specific apps.
 
Old 11-04-2004, 01:21 AM   #2
7.e.Q
LQ Newbie
 
Registered: Nov 2003
Posts: 25

Rep: Reputation: 15
Yes there is. rename your original uname to something like uname-wrapped and create a script in the same location called uname, that runs this uname-wrapped binary with the parameters and output alterations you need. For example, if you want to change the kernel version inside the output of uname from "2.6.7" to "2.6.9" put the following into your uname script:

Code:
#!/bin/bash
uname-wrapped $@ | sed 's/2.6.7/2.6.9/'
this is called "uname hack"... you may google for it.
 
Old 11-04-2004, 06:20 AM   #3
kesari
LQ Newbie
 
Registered: Aug 2003
Location: Bangalore
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you 7.e.Q..



Quote:
Originally posted by 7.e.Q
Yes there is. rename your original uname to something like uname-wrapped and create a script in the same location called uname, that runs this uname-wrapped binary with the parameters and output alterations you need. For example, if you want to change the kernel version inside the output of uname from "2.6.7" to "2.6.9" put the following into your uname script:

Code:
#!/bin/bash
uname-wrapped $@ | sed 's/2.6.7/2.6.9/'
this is called "uname hack"... you may google for it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
uname -a Jeebizz Slackware 18 05-03-2005 05:53 PM
changing uname information helios the sun Linux - Newbie 2 08-10-2004 12:15 PM
Changing the output of lspci GT_Onizuka Linux - General 2 04-30-2004 06:50 PM
Changing the color of ls output? exitsfunnel Linux - Newbie 1 02-20-2004 12:20 AM
uname -s jpbarto Linux - General 2 07-31-2003 01:24 PM


All times are GMT -5. The time now is 11:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration