Re: what sets env MACHTYPE and OSTYPE

From: Kris Kennaway (kkenn_at_xor.obsecurity.org)
Date: 09/19/05


Date: Sun, 18 Sep 2005 20:55:44 -0400

On 2005-09-18, Mark Worsdall <freebsd@NoSpAmPlEaSe-wizdom.org.uk> wrote:
> In message <slrndiri3n.3jv.kkenn@xor.obsecurity.org>, Kris Kennaway
><kkenn@xor.obsecurity.org> writes
>>On 2005-09-18, Mark Worsdall <freebsd@NoSpAmPlEaSe-wizdom.org.uk> wrote:
>>> Hi,
>>>
>>> Is it correct that on a FreeBSD4.11 STABLE machine, that when I look at
>>> the env with printenv I get these 2 values with are wrong:
>>>
>>> MACHTYPE=i386--freebsd4.2
>>> OSTYPE=freebsd4.2
>>>
>>> What sets them and where?
>>
>>What shell are you using, and did you compile it yourself by hand?
>>
> bash 2.04 and yes did compile it myself Jan 19 2001
>
> will:
>
> cd /usr/ports/shell/bash2
> make deinstall distclean
>
> and
>
> cd /usr/ports/shell/bash
> make install distclean

Sounds like it's misconfigured and polluting your environment. This
could be the cause of some of your other problems too.

If you compiled it by hand (i.e. not using the ports tree) then you
won't easily be able to remove it if there are lots of files scattered
throughout the system. If you didn't compile by hand but used a port,
pkg_delete is enough to remove it, and you can then reinstall the
latest version of the port.

Kris