'which' and installing Linux software on -STABLE

Malcolm Kay malcolm.kay at internode.on.net
Thu Jul 24 10:00:48 PDT 2003


On Fri, 25 Jul 2003 01:30, Pete French wrote:
> Has anyone else had frustrating problems with the use of 'which' in
> Linux mode ? I have some SUN software which I am trying to install.
> I am running Linux bash to run the install script - running 'uname'
> returns 'Linux'
>
> But the SUn code does 'which uname' to get the path to 'uname' before
> running it. the ;which' command is a bash builtin, and this returns
> the '/usr/bin/uname' command rather than '/bin/uname'. Thus it
> runs /usr/bin;uname, egts the answer 'FreeBSD' and refuses to install.
>
> Any ideas ? I did a search on this but didnt come up with any answers.

I don't know where bash gets its answer from if uname is builtin, but if you 
have linux compatibility installed you should have a Linux version of the 
uname utility in /usr/compat/linux/bin/ which returns Linux.

Maybe you can trick the installation by temporarily switching the uname 
utilities or perhaps even by adding /usr/compat/linux/bin/ at the front of 
your PATH. Then again perhaps it won't work!

Or if its not called with any options why not temporarily set up a uname 
script which simpley echos Linux.

Malcolm




More information about the freebsd-stable mailing list