How to temporarily set kernel version for software install script?

Cameron Simpson cs at zip.com.au
Sun Mar 19 22:30:52 UTC 2006


On 19Mar2006 22:57, Mostafa Z. Afgani <mostafa.afgani at world.iu-bremen.de> wrote:
| Mostafa Z. Afgani wrote:
| >2. From your shell
| >    $ alias uname='/tmp/unamemod'
| >done. Now $(uname -r) from that console will report 2.4.20
| 
| Oops .. looks like I spoke too soon <embarrassed> .. won't work when 
| uname is called from a script ..

Yep.

| So, as Craig said, modifying the script 
| is your best bet .. of course you could still create the unamemod script 
| and then link that to /bin/uname temporarily -- but I guess that's more 
| trouble than it's worth ;)

I have on occasion made a /tmp/bin/uname script as you describe and
put /tmp/bin at the front of $PATH. It is easier to modify the install
script usually, but I have had to deal with things whose install scripts
unpack archives that contain install scripts, and so it's easier to put
a special uname (or whatever) in and hack $PATH.

Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Newtons 4th law:
    For every action there is an equal and opposite beaureaucratic policy.
        - Adrian Tritschler, ajft at cs.adfa.oz.au




More information about the fedora-list mailing list