The uname hack revisited

Tommy Wareing tommyw at ntlworld.com
Fri Jul 20 02:23:28 PDT 2001


On Thu, Jul 19, 2001 at 07:41:48PM -0400, Kevin Krumwiede wrote:
> I always wondered why, instead of hacking uname itself, it can't be
> temporarily renamed or moved and replaced with a script that fakes the -m
> option and calls the original for everything else?
> 
> raw (hmm, where's my bash book?):
> 
> #!/bin/sh
> if [ "$1" = '-m' ]; then
>    echo 'i386'
> else
>    /usr/bin/uname-orig $@
> fi

Two reasons: why is this simpler than running the output of the
original uname through sed?

And what happens to other options which happen to produce the machine
type? Specifically uname -a? The sed mangling is reasonably future
proof.

-- 
Tommy
-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list