Date: Thu, 4 May 2006 15:05:11 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Kris Kennaway <kris@obsecurity.org> Cc: emulation@freebsd.org, Sean McNeil <sean@mcneil.com> Subject: Re: Linux expr command vs. FreeBSD version Message-ID: <20060504220511.GA18092@odin.ac.hmc.edu> In-Reply-To: <20060504201721.GA70877@xor.obsecurity.org> References: <1146610240.80438.4.camel@triton.mcneil.com> <20060504164959.GA67641@xor.obsecurity.org> <1146763983.98779.12.camel@triton.mcneil.com> <20060504194850.GA70598@xor.obsecurity.org> <1146773314.46954.1.camel@triton.mcneil.com> <20060504201721.GA70877@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 04, 2006 at 04:17:21PM -0400, Kris Kennaway wrote: > On Thu, May 04, 2006 at 01:08:34PM -0700, Sean McNeil wrote: > > On Thu, 2006-05-04 at 15:48 -0400, Kris Kennaway wrote: > > > On Thu, May 04, 2006 at 10:33:03AM -0700, Sean McNeil wrote: > > > > 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: > > > > > >=20 > > > > > > 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 gr= ief with > > > > > > expr as the Linux version supports enhancements like "expr matc= h" > > > > > > 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? > > > > >=20 > > > > > Why is this an issue for you? > > > >=20 > > > > 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. > > > >=20 > > > > I have scripts that run perfect on a Linux machine and fail on Free= BSD > > > > with Linux emulation because they use that very feature. > > >=20 > > > Or just run the script in a chroot (chroot /compat/linux /bin/bash > > > /your/script) so it doesn't see the FreeBSD filesystem at all. This > > > is the only safe way to do it, really - there may be other differences > > > that will cause more subtle aliasing problems. > >=20 > > This is what I was asking (a better solution?) >=20 > Yeah, that's why I needed to find out what your actual problem was > first :-) >=20 > >, but unfortunately you > > have to be superuser to change the root directory whereas I want to run > > things as a normal user. >=20 > Oh well, I don't think there's much you can do here as a normal user. There's always installing sysutils/coreutils and using gexpr or adding a symlink to ~/bin and making that come before /bin in your path. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFEWnqWXY6L6fI4GtQRAtbLAJ0UU/zqTJX5C6t5P3RPu6MqPzq+6gCeKKS5 Td9V3zfQb7teSbjBZdhTZws= =z1d0 -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060504220511.GA18092>