Date: Thu, 04 May 2006 10:33:03 -0700 From: Sean McNeil <sean@mcneil.com> To: Kris Kennaway <kris@obsecurity.org> Cc: emulation@freebsd.org Subject: Re: Linux expr command vs. FreeBSD version Message-ID: <1146763983.98779.12.camel@triton.mcneil.com> In-Reply-To: <20060504164959.GA67641@xor.obsecurity.org> References: <1146610240.80438.4.camel@triton.mcneil.com> <20060504164959.GA67641@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2006-05-04 at 12:49 -0400, Kris Kennaway wrote: > On Tue, May 02, 2006 at 03:50:40PM -0700, Sean McNeil wrote: > > > > I ran into a problem with paths when running linux emulation. It > > appears that when looking for a file, linux emulation will first > > try /compat/linux/path and if not found, /path. This causes grief with > > expr as the Linux version supports enhancements like "expr match" > > whereas the FreeBSD version does not. To get around the issue, I put a > > symlink in /compat/linux/bin/expr -> /compat/linux/usr/bin/expr. I don't > > know of any better solution. Anyone? > > Why is this an issue for you? Like I said, the FreeBSD expr command doesn't support things like "expr match". FreeBSD puts expr in /bin and Linux puts it in /usr/bin. Appropriately, my path looks at /bin before /usr/bin. I have scripts that run perfect on a Linux machine and fail on FreeBSD with Linux emulation because they use that very feature. It is completely silly to have to change my scripts to be "/usr/bin/expr match", so the solution I use is to put the symlink in the Linux environment so that /bin/expr chooses the Linux version of expr (/usr/bin/expr). Cheers, Sean
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1146763983.98779.12.camel>